WC_Settings_Shipping::save()
Save settings.
Method of the class: WC_Settings_Shipping{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Settings_Shipping = new WC_Settings_Shipping(); $WC_Settings_Shipping->save();
WC_Settings_Shipping::save() WC Settings Shipping::save code WC 9.7.1
public function save() { global $current_section; switch ( $current_section ) { case 'options': $this->save_settings_for_current_section(); $this->do_update_options_action(); break; case 'classes': $this->do_update_options_action(); break; case '': break; default: $is_shipping_method = false; foreach ( $this->get_shipping_methods() as $method_id => $method ) { if ( in_array( $current_section, array( $method->id, sanitize_title( get_class( $method ) ) ), true ) ) { $is_shipping_method = true; $this->do_update_options_action( $method->id ); } } if ( ! $is_shipping_method ) { $this->save_settings_for_current_section(); } break; } // Increments the transient version to invalidate cache. WC_Cache_Helper::get_transient_version( 'shipping', true ); }