I’m trying to update the function that handles the upload of the image to variation product ![image variation] https://i.imgur.com/reNn6x7.png I thought that the code that handles it is : inside the class-wc-rest-product-variations-controller.php but any modification at this function is not changing the way that the file is uploaded. the idea is to upload the image and apply the same variation
Tag: woocommerce
Product custom checkbox option that changes Woocommerce cart item price
The following code displays a custom checkbox before add to cart button on single product pages: Now I would like to trap/capture this checkbox option in Woocommerce session and then make a custom price calculations in the following code: What is missing is the part that will capture the checkbox option to set it in sessions, like: Any help is
Is it possible to extend the woocommerce products rest endpoint?
Is there a way to extend the products-object in the woocommerce rest api /wp-json/wc/v3/products, in a non-destructive way, so plugins that uses that endpoint, doesn’t break. I’ve currently tried create my own rest endpoint to replicate the object, but that is now missing alot of data ofc. I’ve also tried something like this, but it didn’t seem to work. Source:
Get WooCommerce product purchase date from a product Id for a user Id
I have faced a problem. I need to get a specific product purchase date using the user id and product id. Using “Checking if customer has already bought something in WooCommerce” answer code, it checks …
Get a custom calculations as WooCommerce admin bulk orders action
i want to make order totals go under a calculation formula. i have drivers whom salary is per order. they deliver paid and unpaid orders. so They collect unpaid cod payments from the customers.At the …
Check if there is 24 hours gone since a Woocommerce order is made
I call a Woocommerce method $order->get_date_created() that is returning this WC_DateTime object: How can I check if there is more (or less) than 24 hours are gone since the order is made? Answer Here is the way to check if there is more (or less) than 24 hours passed since an order has been created, using WC_DateTime and DateTime methods
Customize addresses fields on WooCommerce My account and Checkout
I’m using the woocommerce_checkout_fields filter to edit the value of woocommerce field labels. It works fine on the checkout page (as you might expect), however I cannot understand why it doesn’t also take effect on the account pages. I thought these fields were still taken form the same place? More specifically, I’m talking about the address fields on the edit-address
Restrict content to those who purchased a Woocommerce product
I’m trying to restrict content on the page via shortcode for those who purchased a particular woocommerce product. I tried using the code below but it’s not working – shortcode [wcr pid=”78] this is some text [/wcr] is just being outputted on the page without hiding the content. Woocommerce has a function for restricting content like this. Answer There is
Add rows to Single product Additional information table in WooCommerce 3.6
I am trying to add a row to Single product Additional information table. Actually is there any hooks or filter to do this? I have searched the hook but can’t figure out the solution. Any help is appreciated. Answer Since WooCommerce version 3.6, you can use woocommerce_display_product_attributes filter hook in this simple way, to add custom label/value pairs in “Additional
woocommerce build categories tree
I have this categories into my wordpress (woocommerce), and I need to build a menĂ¹ like this using data retrieved from woocommerce api. What’s an efficient way to build a menĂ¹ like this? I have tried to inspect wordpress code without figured out. This API lets me retrieve all product categories. https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-product-categories this is the object obtained from request: Answer