Automattic\WooCommerce\Blocks\BlockTypes

Checkout::is_checkout_endpoint()protectedWC 1.0

Check if we're viewing a checkout page endpoint, rather than the main checkout page itself.

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

Хуков нет.

Возвращает

true|false.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->is_checkout_endpoint();

Код Checkout::is_checkout_endpoint() WC 8.7.0

protected function is_checkout_endpoint() {
	return is_wc_endpoint_url( 'order-pay' ) || is_wc_endpoint_url( 'order-received' );
}