WC_Admin_Pointers::is_experiment_product_tour()public staticWC 1.0

Check if product tour experiment is treatment.

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

No Hooks.

Return

true|false.

Usage

$result = WC_Admin_Pointers::is_experiment_product_tour();

Code of WC_Admin_Pointers::is_experiment_product_tour() WC 6.7.0

public static function is_experiment_product_tour() {
	$anon_id        = isset( $_COOKIE['tk_ai'] ) ? sanitize_text_field( wp_unslash( $_COOKIE['tk_ai'] ) ) : '';
	$allow_tracking = 'yes' === get_option( 'woocommerce_allow_tracking' );
	$abtest         = new \WooCommerce\Admin\Experimental_Abtest(
		$anon_id,
		'woocommerce',
		$allow_tracking
	);
	return $abtest->get_variation( 'woocommerce_products_tour' ) === 'treatment';
}