WordPress at Your Fingertips
function is not described

WC_Settings_Tracking::track_setting_change() public WC 1.0

Add WooCommerce option to a list of updated options.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Settings_Tracking = new WC_Settings_Tracking();
$WC_Settings_Tracking->track_setting_change( $option_name, $old_value, $new_value );
$option_name(string) (required)
Option being updated.
$old_value(mixed) (required)
Old value of option.
$new_value(mixed) (required)
New value of option.

Code of WC_Settings_Tracking::track_setting_change() WC 5.8.0

public function track_setting_change( $option_name, $old_value, $new_value ) {
	// Make sure this is a WooCommerce option.
	if ( ! in_array( $option_name, $this->allowed_options, true ) ) {
		return;
	}

	// Check to make sure the new value is truly different.
	// `woocommerce_price_num_decimals` tends to trigger this
	// because form values aren't coerced (e.g. '2' vs. 2).
	if (
		is_scalar( $old_value ) &&
		is_scalar( $new_value ) &&
		(string) $old_value === (string) $new_value
	) {
		return;
	}

	$this->updated_options[] = $option_name;
}