Woo API REST : product variation price is read-only?

After some research, i found this example : PUT /wp-json/wc/v3/products/<product_id>/variations/<id> So in javascript we could do : const data = { regular_price: “10.00” }; WooCommerce.put(“products/22/variations/733”, data) .then((response) => { console.log(response.data); }) .catch((error) => { console.log(error.response.data); }); And the JSON API Response : { “id”: 733, “date_created”: “2017-03-23T00:53:11”, “date_created_gmt”: “2017-03-23T03:53:11”, “date_modified”: “2017-03-23T00:53:11”, “date_modified_gmt”: “2017-03-23T03:53:11”, “description”: “”, … Read more

Send a custom WooCommerce email when custom order change [closed]

I think you need do two changes: Add a filter to woocommerce_email_actions that adds the action hook which should trigger the notification: function add_ready_to_ship_woocommerce_email_action( $email_actions ) { $email_actions[] = ‘woocommerce_order_status_ready-to-ship’; return $email_actions; } add_filter( ‘woocommerce_email_actions’, ‘add_ready_to_ship_woocommerce_email_action’ ); Change the trigger hook in the email class (add a _notification suffix): // Trigger on new paid orders … Read more

Change WordPress Site Title and Tagline and WooCommerce settings using ACF [closed]

I don’t think you’ll be able to link them directly. However, you can simply hook into when ACF is saving these fields and also have them overwrite the correct option in the options table or whatever you need to overwrite. Here’s the documentation for hooking into ACF saving values (the acf/save_post hook): https://www.advancedcustomfields.com/resources/acf-save_post/ You’ll probably … Read more

Remove all Span Tags and class From Woocommerce Price [closed]

There’s a few ways to do this, here are two: Method #1 In your theme (parent or child if you are using a child theme to extend the parent) create a folder structure as follows: {your_theme_folder} ∟ woocommerce (directory) ∟ single-product (directory) ∟ price.php (copy from wp-content/plugins/woocommerce/templates/single-product/price.php) Example: {your_theme_folder}/woocommerce/single-product/price.php This file: price.php containes the following: … Read more