Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
195101bbe9
|
@ -643,7 +643,7 @@ class WC_Checkout {
|
||||||
$result = $available_gateways[ $this->posted['payment_method'] ]->process_payment( $order_id );
|
$result = $available_gateways[ $this->posted['payment_method'] ]->process_payment( $order_id );
|
||||||
|
|
||||||
// Redirect to success/confirmation/payment page
|
// Redirect to success/confirmation/payment page
|
||||||
if ( 'success' === $result['result'] ) {
|
if ( isset( $result['result'] ) && 'success' === $result['result'] ) {
|
||||||
|
|
||||||
$result = apply_filters( 'woocommerce_payment_successful_result', $result, $order_id );
|
$result = apply_filters( 'woocommerce_payment_successful_result', $result, $order_id );
|
||||||
|
|
||||||
|
|
|
@ -389,7 +389,7 @@ class WC_CLI_Coupon extends WC_CLI_Command {
|
||||||
* <coupon>
|
* <coupon>
|
||||||
* : The ID or code of the coupon to update.
|
* : The ID or code of the coupon to update.
|
||||||
*
|
*
|
||||||
* --<field>=<value>
|
* [--<field>=<value>]
|
||||||
* : One or more fields to update.
|
* : One or more fields to update.
|
||||||
*
|
*
|
||||||
* ## AVAILABLE FIELDS
|
* ## AVAILABLE FIELDS
|
||||||
|
|
|
@ -147,7 +147,7 @@ class WC_CLI_Customer extends WC_CLI_Command {
|
||||||
* ## OPTIONS
|
* ## OPTIONS
|
||||||
*
|
*
|
||||||
* <customer>
|
* <customer>
|
||||||
* : The customer ID, email, or username to delete.
|
* : The customer ID, email or username.
|
||||||
*
|
*
|
||||||
* [--field=<field>]
|
* [--field=<field>]
|
||||||
* : Instead of returning the whole customer fields, returns the value of a single fields.
|
* : Instead of returning the whole customer fields, returns the value of a single fields.
|
||||||
|
@ -160,7 +160,9 @@ class WC_CLI_Customer extends WC_CLI_Command {
|
||||||
*
|
*
|
||||||
* ## AVAILABLE FIELDS
|
* ## AVAILABLE FIELDS
|
||||||
*
|
*
|
||||||
* See
|
* * download_id
|
||||||
|
* * download_name
|
||||||
|
* * access_expires
|
||||||
*
|
*
|
||||||
* ## EXAMPLES
|
* ## EXAMPLES
|
||||||
*
|
*
|
||||||
|
@ -386,7 +388,7 @@ class WC_CLI_Customer extends WC_CLI_Command {
|
||||||
* ## OPTIONS
|
* ## OPTIONS
|
||||||
*
|
*
|
||||||
* <customer>
|
* <customer>
|
||||||
* : The customer ID, email, or username to delete.
|
* : The customer ID, email or username.
|
||||||
*
|
*
|
||||||
* [--field=<field>]
|
* [--field=<field>]
|
||||||
* : Instead of returning the whole customer fields, returns the value of a single fields.
|
* : Instead of returning the whole customer fields, returns the value of a single fields.
|
||||||
|
@ -423,7 +425,7 @@ class WC_CLI_Customer extends WC_CLI_Command {
|
||||||
* <customer>
|
* <customer>
|
||||||
* : Customer ID, email, or username.
|
* : Customer ID, email, or username.
|
||||||
*
|
*
|
||||||
* --<field>=<value>
|
* [--<field>=<value>]
|
||||||
* : One or more fields to update.
|
* : One or more fields to update.
|
||||||
*
|
*
|
||||||
* ## AVAILABLE FIELDS
|
* ## AVAILABLE FIELDS
|
||||||
|
|
|
@ -27,6 +27,13 @@ class WC_CLI_Order extends WC_CLI_Command {
|
||||||
*
|
*
|
||||||
* * customer_id
|
* * customer_id
|
||||||
*
|
*
|
||||||
|
* Optional fields:
|
||||||
|
*
|
||||||
|
* * status
|
||||||
|
* * note
|
||||||
|
* * currency
|
||||||
|
* * order_meta
|
||||||
|
*
|
||||||
* Payment detail fields:
|
* Payment detail fields:
|
||||||
*
|
*
|
||||||
* * payment_details.method_id
|
* * payment_details.method_id
|
||||||
|
@ -77,7 +84,7 @@ class WC_CLI_Order extends WC_CLI_Command {
|
||||||
*
|
*
|
||||||
* ## EXAMPLES
|
* ## EXAMPLES
|
||||||
*
|
*
|
||||||
* wp wc order create --customer_id=1 --
|
* wp wc order create --customer_id=1 --status=pending ...
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
*/
|
*/
|
||||||
|
@ -162,11 +169,6 @@ class WC_CLI_Order extends WC_CLI_Command {
|
||||||
update_post_meta( $order->id, '_order_currency', $data['currency'] );
|
update_post_meta( $order->id, '_order_currency', $data['currency'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set order numberl
|
|
||||||
if ( isset( $data['order_number'] ) ) {
|
|
||||||
update_post_meta( $order->id, '_order_number', $data['order_number'] );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set order meta.
|
// Set order meta.
|
||||||
if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) {
|
if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) {
|
||||||
$this->set_order_meta( $order->id, $data['order_meta'] );
|
$this->set_order_meta( $order->id, $data['order_meta'] );
|
||||||
|
@ -191,7 +193,12 @@ class WC_CLI_Order extends WC_CLI_Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete an order.
|
* Delete one or more orders.
|
||||||
|
*
|
||||||
|
* ## OPTIONS
|
||||||
|
*
|
||||||
|
* <id>...
|
||||||
|
* : The order ID to delete.
|
||||||
*
|
*
|
||||||
* ## EXAMPLES
|
* ## EXAMPLES
|
||||||
*
|
*
|
||||||
|
@ -397,14 +404,14 @@ class WC_CLI_Order extends WC_CLI_Command {
|
||||||
* <id>
|
* <id>
|
||||||
* : Product ID
|
* : Product ID
|
||||||
*
|
*
|
||||||
* --<field>=<value>
|
* [--<field>=<value>]
|
||||||
* : One or more fields to update.
|
* : One or more fields to update.
|
||||||
*
|
*
|
||||||
* ## AVAILABLE_FIELDS
|
* ## AVAILABLE FIELDS
|
||||||
*
|
*
|
||||||
* For available fields, see: wp wc order create --help
|
* For available fields, see: wp wc order create --help
|
||||||
*
|
*
|
||||||
* # EXAMPLES
|
* ## EXAMPLES
|
||||||
*
|
*
|
||||||
* wp wc order update 123 --status=completed
|
* wp wc order update 123 --status=completed
|
||||||
*
|
*
|
||||||
|
|
|
@ -578,7 +578,7 @@ class WC_CLI_Product extends WC_CLI_Command {
|
||||||
* <id>
|
* <id>
|
||||||
* : Product ID
|
* : Product ID
|
||||||
*
|
*
|
||||||
* --<field>=<value>
|
* [--<field>=<value>]
|
||||||
* : One or more fields to update.
|
* : One or more fields to update.
|
||||||
*
|
*
|
||||||
* ## AVAILABLE_FIELDS
|
* ## AVAILABLE_FIELDS
|
||||||
|
|
|
@ -462,7 +462,7 @@ class WC_CLI_Tax extends WC_CLI_Command {
|
||||||
* <id>
|
* <id>
|
||||||
* : The ID of the tax rate to update.
|
* : The ID of the tax rate to update.
|
||||||
*
|
*
|
||||||
* --<field>=<value>
|
* [--<field>=<value>]
|
||||||
* : One or more fields to update.
|
* : One or more fields to update.
|
||||||
*
|
*
|
||||||
* ## AVAILABLE FIELDS
|
* ## AVAILABLE FIELDS
|
||||||
|
|
Loading…
Reference in New Issue