Saving taxes should invalidate caches.

This commit is contained in:
Mike Jolley 2018-01-18 17:47:26 +00:00
parent 673546b7e0
commit a110180643
3 changed files with 6 additions and 1 deletions

View File

@ -186,7 +186,7 @@ class WC_Settings_Shipping extends WC_Settings_Page {
break;
}
// Increments the transient version to invalidate cache
// Increments the transient version to invalidate cache.
WC_Cache_Helper::get_transient_version( 'shipping', true );
}

View File

@ -118,7 +118,9 @@ class WC_Settings_Tax extends WC_Settings_Page {
$this->save_tax_rates();
}
// Invalidate caches.
WC_Cache_Helper::incr_cache_prefix( 'taxes' );
WC_Cache_Helper::get_transient_version( 'shipping', true );
}
/**

View File

@ -2347,6 +2347,9 @@ class WC_AJAX {
}
}
WC_Cache_Helper::incr_cache_prefix( 'taxes' );
WC_Cache_Helper::get_transient_version( 'shipping', true );
wp_send_json_success( array(
'rates' => WC_Tax::get_rates_for_tax_class( $current_class ),
) );