mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Move update order status after PayPal order creation
This commit is contained in:
parent
7ffbb5e159
commit
39f41e1a14
1 changed files with 1 additions and 1 deletions
|
@ -249,13 +249,13 @@ class PayUponInvoiceGateway extends WC_Payment_Gateway {
|
|||
$wc_order->save();
|
||||
}
|
||||
|
||||
$wc_order->update_status( 'on-hold', __( 'Awaiting Pay upon Invoice payment.', 'woocommerce-paypal-payments' ) );
|
||||
$purchase_unit = $this->purchase_unit_factory->from_wc_order( $wc_order );
|
||||
$payment_source = $this->payment_source_factory->from_wc_order( $wc_order, $birth_date );
|
||||
|
||||
try {
|
||||
$order = $this->order_endpoint->create( array( $purchase_unit ), $payment_source, $wc_order );
|
||||
$this->add_paypal_meta( $wc_order, $order, $this->environment );
|
||||
$wc_order->update_status( 'on-hold', __( 'Awaiting Pay upon Invoice payment.', 'woocommerce-paypal-payments' ) );
|
||||
|
||||
as_schedule_single_action(
|
||||
time() + ( 5 * MINUTE_IN_SECONDS ),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue