Skip to content

Commit 0592889

Browse files
committed
Fix APM orders stuck in pending by accepting pending status in PAYMENT.CAPTURE.COMPLETED handler
1 parent 247d167 commit 0592889

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/ppcp-webhooks/src/Handler/PaymentCaptureCompleted.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function handle_request( \WP_REST_Request $request ): WP_REST_Response {
109109
*/
110110
do_action( 'woocommerce_paypal_payments_payment_capture_completed_webhook_handler', $wc_order, $order_id );
111111

112-
if ( $wc_order->get_status() !== 'on-hold' ) {
112+
if ( ! in_array( $wc_order->get_status(), array( 'pending', 'on-hold' ), true ) ) {
113113
return $this->success_response();
114114
}
115115
$wc_order->add_order_note(

0 commit comments

Comments
 (0)