call payment_complete() instead of update status

This commit is contained in:
Kirill Braslavsky 2021-04-14 16:34:14 +03:00
parent d257b270df
commit 4ee48de635
3 changed files with 5 additions and 8 deletions

View file

@ -176,10 +176,8 @@ class OrderProcessor {
__( 'Awaiting payment.', 'woocommerce-paypal-payments' )
);
if ( $order->status()->is( OrderStatus::COMPLETED ) && $order->intent() === 'CAPTURE' ) {
$wc_order->update_status(
'processing',
__( 'Payment received.', 'woocommerce-paypal-payments' )
);
$wc_order->payment_complete();
}
if ( $this->capture_authorized_downloads( $order ) && $this->authorized_payments_processor->process( $wc_order ) ) {