WooCommerce::get_tracking_history()publicWC .

Tracks the history WooCommerce Allow Tracking option.

  • When the field was first set to allow tracking
  • Last time the option was changed

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

Хуков нет.

Возвращает

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

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

$WooCommerce = new WooCommerce();
$WooCommerce->get_tracking_history( $old_value, $value );
$old_value(строка) (обязательный)
The old value for the woocommerce_allow_tracking option.
$value(строка) (обязательный)
The current value for the woocommerce_allow_tracking option.

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

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

Код WooCommerce::get_tracking_history() WC 9.8.2

public function get_tracking_history( $old_value, $value ) {
	// If woocommerce_allow_tracking_first_optin is not set. It means is the first time it gets set.
	if ( ! get_option( 'woocommerce_allow_tracking_first_optin' ) && 'yes' === $value ) {
		update_option( 'woocommerce_allow_tracking_first_optin', time() );
	}

	// Always update the last change.
	update_option( 'woocommerce_allow_tracking_last_modified', time() );
}