Did you confirm it was the transient values causing the options to not update?
Here’s the WordPress function to clear transient values: https://codex.wordpress.org/Function_Reference/delete_transient
An example:
<?php
// Create a simple function to delete our transient
function edit_term_delete_transient() {
delete_transient( 'the_transient_name_to_delete' );
}
// Add the function to the edit_term hook so it runs when categories/tags are edited
add_action( 'edit_term', 'edit_term_delete_transient' );
?>
- You can search the database for the names of the transient entries to delete.
(Note, you might also want to verify that the edit_term hook is a sufficient place to call the delete_transient function. You could have other optimized points in your code to call this as well.)
** You can also check https://docs.woocommerce.com/document/shipping-method-api/ for info on how to manipulate WooCommerce shipping options.
Related Posts:
- Is get_option() faster than accessing get_transient()?
- Storing product price data in the database
- How do I add CSS options to my plugin without using inline styles?
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- How come `wp_options` table does not have an index on `autoload`?
- What are the advantages to the Settings API?
- Adding Widget form fields dynamically
- How to properly sanitize strings for update_option()
- WooCommerce get Shipping Class of product from either the product id or the order after order is completed
- How to iterate through custom posts and add the title to an array
- How do I handle multiple Submit buttons in plugin’s option page?
- Deletion of shared options using uninstall.php
- update_option is not working!
- Save user-specific options in WordPress admin
- How to store accumulate multiple option values in a single array using Options_API
- WordPress Plugin Setting’s POST
- Performance of several get_option() calls
- set_sale_price in WooCommerce [closed]
- Extend plugin options page
- How to update total price of completed order in woocommerce? [closed]
- How do I change the initial quantity of a product in woocommerce?
- Order properties should not be accessed directly
- How to add settings subpage from a plugin to a settings page created in theme?
- Plugin options not being saved or created
- Remove Internal Style Sheet if no Value Provided?
- What could cause my plugin’s options/settings page not to load?
- How to set “Site Address (URL)” programmatically on WP multisite?
- Using wp_parse_args to set up Plugin Default Settings
- Show special field when correct shipping is chosen
- WooCommerce Admin Reports : Get custom product report based on date range
- Adding a brand column to WooCommerce Products
- WP_Editor – Saving Value into Plugin Option – Stripping HTML
- “import declarations may only appear at top level of a module” when importing WooCommerce API node module
- Woocommerce extend tax report with custom column
- Show disclaimer with accept button before redirecting to the payment gateway website
- How do I apply a custom discount to individual product total prices depending on their categories on the cart and checkout pages of WooCommerce? [closed]
- Can’t get woocommerce_get_price_html to work [closed]
- How to restrict access to image folder depending on whether product is purchased or not?
- Parse form values before sending to options.php
- woocommerce_checkout_order_processed hook executing function twice
- Is there a way in which I can compare product id with the order id to display content on front end before placing the order? [closed]
- Update problem with update_option() in combination with register_setting()
- Insert/Update values to a table after blogname option etc. is updated
- wordpress how to query wp_options table
- How Can I add Fields in wp-option table?
- Redirect to another page using contact form 7? [closed]
- Change WooCommerce Email Header using custom plugin
- Plugin Options Array Set to Undefined
- UWooCommerce – add cart discount programmatically?
- Checked() function on a multidimensional array
- Remove an action by extending class and replacing it
- Issue on Checkbox with Custom Option Page
- The Correct Way to Use Nonce Field without Settings API
- Woocommerce inventory [closed]
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- How to change WooCommerce loop product title HTML output in single product page and archive page
- Settings API: Setting default option via ‘get_option’ fails
- Updating transient value frequently
- WooCommerce Endpoints content
- Duplicate shipping method logic to another shipping method [closed]
- how to save wp_editor html content in options table
- Hide one specific woocoomerce product
- get_shipping_methods() return empty rate
- What could cause a WP Option to get truncated?
- wp_schedule_single_event is set correctly but sometimes not fired
- Change reminder email date to 14 days before
- Make a php array load faster
- How to make every image title equal to alt text(wordpress/woocommerce)?
- Create Woocommerce product without creating api credentials
- How does one update complex options?
- Pass Values in URL on WooCommerce Product Page
- Woocommerce place order update shipping price
- Add custom product data using javascript when add to cart button is clicked
- product-attribute-slug-is-too-long-28-characters-max
- “add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar
- How do I add filter with woocommerce categories?
- Getting products information, in woocommerce based on products ID
- How to direct WordPress to load custom template for custom post type
- PHPUnit Testing and woocommerce Constant
- Woocommerce Product finder feature on home page
- want to confirm popup with “Yes” and “No” button when user click on add to cart
- Plugins Settings page not updating
- Woocommerce Single Product Tabs Got Duplicate
- Woocommerce product not appearing in category list page when created programatically [closed]
- Override theme’s WooCommerce file
- WordPress Reset password Strength set to medium
- external Integration with wordpress timeout error
- add_settings_error on validating plugin options API
- Cannot save settings value
- Woocommerce Custom Checkout
- WP: adding Javascript to specific woo commerce pages
- the correct way to use options from settings page [closed]
- Menu_slug used for creating options page
- How to only Load scripts on variable products page
- how do I find out if a placed order was deleted or trashed? [closed]
- Return custom product in ajax call loop
- WooCommerce adds a newline symbol (\n) between email recipients
- Allow HTML in product attributes and variation for WooCommerce
- How do I add multiple custom menu Woo-commerce my account page?
- High-Performance Order Storage conflict action `manage_shop_order_posts_custom_column`