Automattic\WooCommerce\Blocks\Utils

CartCheckoutUtils::has_cart_pagepublic staticWC 1.0

Check if the cart page is defined.

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

Хуков нет.

Возвращает

true|false. True if the cart page is defined, false otherwise.

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

$result = CartCheckoutUtils::has_cart_page();

Код CartCheckoutUtils::has_cart_page() WC 10.3.6

public static function has_cart_page() {
	return wc_get_page_permalink( 'cart', -1 ) !== -1;
}