WC_Admin_Settings::save()public staticWC 1.0

Save the settings.

{} It's a method of the class: WC_Admin_Settings{}

Return

null. Nothing.

Usage

$result = WC_Admin_Settings::save();

Code of WC_Admin_Settings::save() WC 6.7.0

public static function save() {
	global $current_tab;

	check_admin_referer( 'woocommerce-settings' );

	// Trigger actions.
	do_action( 'woocommerce_settings_save_' . $current_tab );
	do_action( 'woocommerce_update_options_' . $current_tab );
	do_action( 'woocommerce_update_options' );

	self::add_message( __( 'Your settings have been saved.', 'woocommerce' ) );
	self::check_download_folder_protection();

	// Clear any unwanted data and flush rules.
	update_option( 'woocommerce_queue_flush_rewrite_rules', 'yes' );
	WC()->query->init_query_vars();
	WC()->query->add_endpoints();

	do_action( 'woocommerce_settings_saved' );
}