woocommerce_is_checkout хук-фильтрWC 2.4.0

Filter to allow for custom logic to determine if the checkout page is being viewed.

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

add_filter( 'woocommerce_is_checkout', 'wp_kama_woocommerce_is_checkout_filter' );

/**
 * Function for `woocommerce_is_checkout` filter-hook.
 * 
 * @param bool $is_checkout Whether the checkout page is being viewed.
 *
 * @return bool
 */
function wp_kama_woocommerce_is_checkout_filter( $is_checkout ){

	// filter...
	return $is_checkout;
}
$is_checkout(true|false)
Whether the checkout page is being viewed.

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

С версии 2.4.0 Введена.

Где вызывается хук

is_checkout()
woocommerce_is_checkout
woocommerce/includes/wc-conditional-functions.php 121
return apply_filters( 'woocommerce_is_checkout', false ) || Constants::is_defined( 'WOOCOMMERCE_CHECKOUT' ) || CartCheckoutUtils::is_checkout_page();

Где используется хук в WooCommerce

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