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.

Method of the class: AbstractOrderConfirmationBlock{}

No Hooks.

Returns

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->email_verification_permitted( $order );
$order(\WC_Order) (required)
Order object.

AbstractOrderConfirmationBlock::email_verification_permitted() code 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 );
}