woocommerce_update_option action-hookWC 1.0

Deprecated from version 2.4.0 - doesn't allow manipulation of values!. It is no longer supported and can be removed in future releases. It is recommended to replace this hook with the same one.

Deprecated: 2.4.0 - doesn't allow manipulation of values!

Fire an action before saved.

Usage

add_action( 'woocommerce_update_option', 'wp_kama_woocommerce_update_option_action' );

/**
 * Function for `woocommerce_update_option` action-hook.
 * 
 * @param  $option 
 *
 * @return void
 */
function wp_kama_woocommerce_update_option_action( $option ){

	// action...
}
$option
-

Changelog

Deprecated since 2.4.0 - doesn't allow manipulation of values!

Where the hook is called

WC_Admin_Settings::save_fields()
woocommerce_update_option
WC_AJAX::toggle_gateway_enabled()
woocommerce_update_option
WC_Settings_API::process_admin_options()
woocommerce_update_option
WC_Gateway_BACS::save_account_details()
woocommerce_update_option
woocommerce/includes/admin/class-wc-admin-settings.php 913
do_action( 'woocommerce_update_option', $option );
woocommerce/includes/class-wc-ajax.php 3106
do_action( 'woocommerce_update_option', $option );
woocommerce/includes/class-wc-ajax.php 3110
do_action( 'woocommerce_update_option', $option );
woocommerce/includes/abstracts/abstract-wc-settings-api.php 222
do_action( 'woocommerce_update_option', array( 'id' => $option_key ) );
woocommerce/includes/gateways/bacs/class-wc-gateway-bacs.php 236
do_action( 'woocommerce_update_option', array( 'id' => 'woocommerce_bacs_accounts' ) );

Where the hook is used in WooCommerce

woocommerce/includes/tracks/events/class-wc-settings-tracking.php 34
add_action( 'woocommerce_update_option', array( $this, 'add_option_to_list' ) );