WordPress at Your Fingertips
function is not described

WC_Order_Data_Store_CPT::create() public WC 1.0

Method to create a new order in the database.

{} It's a method of the class: WC_Order_Data_Store_CPT{}

Hooks from the method
Return

null. Nothing.

Usage

$WC_Order_Data_Store_CPT = new WC_Order_Data_Store_CPT();
$WC_Order_Data_Store_CPT->create( $order );
$order(WC_Order) (required) (passed by reference — &)
Order object.

Code of WC_Order_Data_Store_CPT::create() WC 5.6.0

public function create( &$order ) {
	if ( '' === $order->get_order_key() ) {
		$order->set_order_key( wc_generate_order_key() );
	}
	parent::create( $order );
	do_action( 'woocommerce_new_order', $order->get_id(), $order );
}