In WordPress admin, I have defined the size for medium as such: I have then uploaded an image and defined in my code to use medium $image = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘medium’ ); However, the image size is being rendered at 370 x 186px. With the original size of the image being 1200 x 600. Seems like the width settings are
Tag: wordpress
How to auto update an acf field based on the condition?
I have two custom post types with acf fields. Custom Post_A, which has 2 fields – title / submitted Custom Post_B, which has 2 fields – title / percent Both Post_A and B have the same title (which is …
How to get the complete state name from a WooCommerce order?
I’m new to WordPress and WooCommerce plugins and such. I’m writing a plugin and I need to send some data to a SOAP API, the case is that the API only accepts the state full name but I’m only getting …
Allow access to any order on front-end on WooCommerce
My goal is to allow certain role to view any order in shop. While displaying all orders in “My Account” page is relatively easy, accessing particular order created by different user always ends up with “Invalid order. My account” error. So far I have added custom query on woocommerce_my_account_my_orders_query filter, so that one can view all orders made by accounts
Removing admin menu links in wordpress using user ID
This is my code and I dont know why isnt working Answer You misspelled the name edit-comment.php try the below code.
Add minutes to time based on current time
I am trying to figure out a way to change a value based on current time, currently I am using the following code to add certain minutes the time the order is placed. which is working fine (except for $minutes_to_add = 170 is only adding only 30 minutes to the current time for some reason but I am living with
How to target an array of Product IDs in WooCommerce?
I’m using the code below to change a product price to text (Contact for Pricing) when the price field is left empty: It works for one product, but I’m having trouble getting it to work for multiple products. How do I target an array of product ids? Answer For an array of product IDs use in_array() conditional function as follows:
Shipping rates based on service custom delivery type and items total in Woocommerce
I just require a small help on displaying the correct shipping fees in my WordPress and woocommerce site. I have set my shipping fees as the following: Flat rate (Delivery): $10 Free Shipping (Free Delivery) Local Pickup (Pickup): $0 When I make an order and go onto the checkout page, it gives me the options to select from for shipping
How to get WooCommerce product object in a custom shortcode to avoid errors
I have a function in which i am trying to get the product short description of the current product using the product id but i keep getting Uncaught Error: Call to a member function get_short_description() on bool in I have the following shortcode function where I am trying to get the product short description of the current WooCommerce product using
Display bookings date time in Woocommerce admin order list
In Woocommerce with Woocommerce Bookings, I have the following to add the booking details in WooCommerce order preview, below each order item: How to display the booking date and time (not the order date and time) in in the woocommerce admin orders list under the billing_address column? Any help is appreciated. Answer You can use the following to display the