includes/cli/class-wc-cli-order.php 1 location
|
@@ 121-123 (lines=3) @@
|
| 118 |
|
// create the pending order |
| 119 |
|
$order = $this->create_base_order( $default_order_args, $data ); |
| 120 |
|
|
| 121 |
|
if ( is_wp_error( $order ) ) { |
| 122 |
|
throw new WC_CLI_Exception( 'woocommerce_cli_cannot_create_order', sprintf( __( 'Cannot create order: %s', 'woocommerce' ), implode( ', ', $order->get_error_messages() ) ) ); |
| 123 |
|
} |
| 124 |
|
|
| 125 |
|
// billing/shipping addresses |
| 126 |
|
$this->set_order_addresses( $order, $data ); |
includes/api/class-wc-rest-orders-controller.php 1 location
|
@@ 434-436 (lines=3) @@
|
| 431 |
|
'created_via' => 'rest-api', |
| 432 |
|
) ); |
| 433 |
|
|
| 434 |
|
if ( is_wp_error( $order ) ) { |
| 435 |
|
throw new WC_REST_Exception( 'woocommerce_rest_cannot_create_order', sprintf( __( 'Cannot create order: %s.', 'woocommerce' ), implode( ', ', $order->get_error_messages() ) ), 400 ); |
| 436 |
|
} |
| 437 |
|
|
| 438 |
|
// Set addresses. |
| 439 |
|
if ( is_array( $request['billing'] ) ) { |
includes/api/legacy/v2/class-wc-api-orders.php 1 location
|
@@ 416-418 (lines=3) @@
|
| 413 |
|
// create the pending order |
| 414 |
|
$order = $this->create_base_order( $default_order_args, $data ); |
| 415 |
|
|
| 416 |
|
if ( is_wp_error( $order ) ) { |
| 417 |
|
throw new WC_API_Exception( 'woocommerce_api_cannot_create_order', sprintf( __( 'Cannot create order: %s', 'woocommerce' ), implode( ', ', $order->get_error_messages() ) ), 400 ); |
| 418 |
|
} |
| 419 |
|
|
| 420 |
|
// billing/shipping addresses |
| 421 |
|
$this->set_order_addresses( $order, $data ); |
includes/api/legacy/v3/class-wc-api-orders.php 1 location
|
@@ 448-450 (lines=3) @@
|
| 445 |
|
// create the pending order |
| 446 |
|
$order = $this->create_base_order( $default_order_args, $data ); |
| 447 |
|
|
| 448 |
|
if ( is_wp_error( $order ) ) { |
| 449 |
|
throw new WC_API_Exception( 'woocommerce_api_cannot_create_order', sprintf( __( 'Cannot create order: %s', 'woocommerce' ), implode( ', ', $order->get_error_messages() ) ), 400 ); |
| 450 |
|
} |
| 451 |
|
|
| 452 |
|
// billing/shipping addresses |
| 453 |
|
$this->set_order_addresses( $order, $data ); |