Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation
AbstractOrderConfirmationBlock::is_customer_order
See if the current order came from a guest or a logged in customer.
Method of the class: AbstractOrderConfirmationBlock{}
No Hooks.
Returns
true|false
.
Usage
// protected - for code of main (parent) or child class $result = $this->is_customer_order( $order );
- $order(WC_Order) (required)
- Order object.
AbstractOrderConfirmationBlock::is_customer_order() AbstractOrderConfirmationBlock::is customer order code WC 9.9.5
protected function is_customer_order( $order ) { return 0 < $order->get_user_id(); }