Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation

AbstractOrderConfirmationBlock::email_verification_permitted()protectedWC 1.0

Guest users without an active session can provide their email address to view order details. This however can only be permitted if the user also provided the correct order key, and guest checkout is actually enabled.

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

Хуков нет.

Возвращает

true|false.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->email_verification_permitted( $order );
$order(\WC_Order) (обязательный)
Order object.

Код AbstractOrderConfirmationBlock::email_verification_permitted() WC 9.8.5

protected function email_verification_permitted( $order ) {
	return $this->allow_guest_checkout() && $this->has_valid_order_key( $order ) && ! $this->is_customer_order( $order );
}