Prevent duplicate actions from firing in shipping settings
This commit is contained in:
parent
4cbdcf2d1b
commit
1716538617
|
@ -174,8 +174,11 @@ class WC_Settings_Shipping extends WC_Settings_Page {
|
||||||
switch ( $current_section ) {
|
switch ( $current_section ) {
|
||||||
case 'options':
|
case 'options':
|
||||||
WC_Admin_Settings::save_fields( $this->get_settings() );
|
WC_Admin_Settings::save_fields( $this->get_settings() );
|
||||||
|
do_action( 'woocommerce_update_options_' . $this->id . '_options' );
|
||||||
break;
|
break;
|
||||||
case 'classes':
|
case 'classes':
|
||||||
|
do_action( 'woocommerce_update_options_' . $this->id . '_classes' );
|
||||||
|
break;
|
||||||
case '':
|
case '':
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -189,10 +192,6 @@ class WC_Settings_Shipping extends WC_Settings_Page {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $current_section ) {
|
|
||||||
do_action( 'woocommerce_update_options_' . $this->id . '_' . $current_section );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Increments the transient version to invalidate cache.
|
// Increments the transient version to invalidate cache.
|
||||||
WC_Cache_Helper::get_transient_version( 'shipping', true );
|
WC_Cache_Helper::get_transient_version( 'shipping', true );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue