Automattic\WooCommerce\Blocks\Utils
CartCheckoutUtils::has_cart_page
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() CartCheckoutUtils::has cart page WC 10.3.6
public static function has_cart_page() {
return wc_get_page_permalink( 'cart', -1 ) !== -1;
}