Thanks to a colleague at codeable I was able to solve this by saving the product after setting the sale price:
$editedProduct->save();
Simple as that. If only I’d known that 6 hours ago!
Related Posts:
- Remove an action by extending class and replacing it
- Plugin Form Submission Best Practice
- Using a plugin class inside a template
- Using OOP plugin’s methods throughout the website
- How Can I Add a Filter to Class Instance Only?
- WooCommerce get Shipping Class of product from either the product id or the order after order is completed
- Plugin Architecture/Design Pattern – is better to use a private Observer/Mediator Pattern for plugin subclasses or WP add_action?
- product-attribute-slug-is-too-long-28-characters-max
- get all products of one category
- Woocommerce add custom button to backend order table
- Plugin vs Settings load order (woocommerce dependency)
- How do I hook a custom discount to change a WC_Order price total on WooCommerce?
- Using a front controller in a WordPress plugin, any suggestions?
- Add multiple shipping rates from add_rate function with custom ID
- Print value of an array or variable in a payment plugin
- How to update total price of completed order in woocommerce? [closed]
- Plugin development: get_post_meta is not working [closed]
- WordPress Ajax callback function from plugin – OOP
- $wpdb -> Batch insert from XML File?
- How do I change the initial quantity of a product in woocommerce?
- How do I add custom column to woocommerce cart?
- Registering and using actions which return results in a Plugin class
- Applying OO patterns and principles to plugin development
- WooCommerce Conditional Tag inside plugin
- Custom attribute type not displaying terms in edit product – WooCommerce
- WooCommerce registration password field not displaying
- Show special field when correct shipping is chosen
- update woocommere total value on checkout based on selected payment method
- how to add custom functionality after woocommerce place order button
- Adding a brand column to WooCommerce Products
- PHP – Extend WordPress Woocommerce Revenue Analytics with custom field
- “import declarations may only appear at top level of a module” when importing WooCommerce API node module
- Woocommerce extend tax report with custom column
- How can we display product price $104 on the cart while the credit card payment method is checked?
- Plugin Architecture Question: How to avoid using transients
- How to extend WooCommerce API to show bookable product availability rules?
- Customize WooCommerce my account dashboard through plugin
- woocommerce_checkout_order_processed hook executing function twice
- Dynamically creating classes for Widget API
- WordPress class, using add_action to call member function does not work
- UWooCommerce – add cart discount programmatically?
- Woocommerce order empty items array
- Using OOP inside a Plugin – Is it allowed?
- How to get all product in the woo-commerce? [closed]
- A question about add_action()
- WordPress plugin development OOP style
- Woocommerce inventory [closed]
- Can woocommerse be used dynamically for billing from another plugin for payment processing?
- Can we use a library under MIT license in a WooCommerce plugin?
- WooCommerce Endpoints content
- How to call code when adding WooCommerce menu items via woocommerce_account_menu_items
- Custom Plugin Options Won’t Update
- Woocommerce – Provide Associated Category Link for Product List Plugin [closed]
- OOP plugin not working
- Remove Products From Category
- want to show CMB2 metabox on woocommerce product data tab
- Customise Grouped Product display in Woocommerce with custom column
- Change reminder email date to 14 days before
- How to make every image title equal to alt text(wordpress/woocommerce)?
- How to call a function from a shortcode function in an oop plugin
- Bad request 400 using class based files
- Trying to run a Ajax request from a checkout form in woocommerce via a custom plugin
- Securing custom rest API endpoints with public access from PWA
- WooCommerce – Stop assigning order numbers
- Adding customs fields on each product on the cart
- Override woocommerce loop-start.php from theme using plugin?
- Getting products information, in woocommerce based on products ID
- WC REST API Error Handling
- Pre-populated WooCommerce checkout fields: dropdown fields issue
- want to confirm popup with “Yes” and “No” button when user click on add to cart
- How to remove the WooCommerce Product->Category thumbnail from admin [closed]
- Performing ajax request in wordpress
- Error when activating a custom plugin on production server
- woocommerce wc_get_product is not fetching all the product of particular category
- Override WooCommerce files from plugin
- OOP development and hooks
- woocommerce add a new bulk action in the bulk actions dropdown in the orders list
- How to trigger WooCommerce user profile edit change?
- WC_Geolocation not found inside plugin
- How to use functions from Woocommerce documentation?
- How to Maintain url on form submit
- external Integration with wordpress timeout error
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- Handle changed Woocommerce function
- Making Woocommerce optimized for more than 500k products
- How is construct function working even when variable is assigned null value?
- Object Oriented plugin, add action and variables
- Woo-commerce: Adding additional page sections using a child theme
- Declaring a new woo commerce product type i get this error
- woocommerce single product page hook not working
- How do I create Widget within plugin that uses its own class?
- How to remove city field from order in dashboard?
- Method not receiving attributes from shortcode call, general OOP problems
- How to only Load scripts on variable products page
- How to design WooCommerce-like admin tabs for plugin settings page?
- Woocommerce: block user removing cart item
- What is the meta_query key name for the woo product average rating? [closed]
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Return custom product in ajax call loop
- I want to redirect user to an amazon product page from my wordpress website when they add product to there cart [closed]