Saving taxes should invalidate caches.
This commit is contained in:
parent
673546b7e0
commit
a110180643
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 ),
|
||||
) );
|
||||
|
|
Loading…
Reference in New Issue