Custom Plugin Options Won’t Update

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.