WC_Tracks::track_woocommerce_allow_tracking_toggledpublic staticWC .

Track when the user attempts to toggle woocommerce_allow_tracking option.

Метод класса: WC_Tracks{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = WC_Tracks::track_woocommerce_allow_tracking_toggled( $prev_value, $new_value, $context );
$prev_value(строка) (обязательный)
The previous value for the setting. 'yes' or 'no'.
$new_value(строка) (обязательный)
The new value for the setting. 'yes' or 'no'.
$context(строка)
Which avenue the user utilized to toggle.
По умолчанию: 'settings'

Список изменений

С версии . Введена.
Since x.x.x

Код WC_Tracks::track_woocommerce_allow_tracking_toggled() WC 9.9.4

public static function track_woocommerce_allow_tracking_toggled( $prev_value, $new_value, $context = 'settings' ) {
	if ( $new_value !== $prev_value ) {
		self::record_event(
			'woocommerce_allow_tracking_toggled',
			array(
				'previous_value' => $prev_value,
				'new_value'      => $new_value,
				'context'        => $context,
			)
		);
	}
}