WC_Order::is_created_via()publicWC 4.0.0

Check if order has been created via admin, checkout, or in another way.

Method of the class: WC_Order{}

Hooks from the method

Return

true|false.

Usage

$WC_Order = new WC_Order();
$WC_Order->is_created_via( $modus );
$modus(string) (required)
Way of creating the order to test for.

Changelog

Since 4.0.0 Introduced.

WC_Order::is_created_via() code WC 8.6.1

public function is_created_via( $modus ) {
	return apply_filters( 'woocommerce_order_is_created_via', $modus === $this->get_created_via(), $this, $modus );
}