From e8c21477624a8cb843230044d3217ef4417aa4be Mon Sep 17 00:00:00 2001 From: dinamiko Date: Fri, 4 Mar 2022 12:08:39 +0100 Subject: [PATCH] Fix psalm errors --- .../src/Processor/AuthorizedPaymentsProcessor.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php b/modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php index 6de871597..dbc8a16d1 100644 --- a/modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php +++ b/modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php @@ -227,7 +227,11 @@ class AuthorizedPaymentsProcessor { ) ); - if ( $this->config->has( 'intent' ) && strtoupper( (string) $this->config->get( 'intent' ) ) === 'CAPTURE' ) { + if ( + $this->config->has( 'intent' ) + && strtoupper( (string) $this->config->get( 'intent' ) ) === 'CAPTURE' + && is_array( $wc_orders ) + ) { foreach ( $wc_orders as $wc_order ) { if ( $this->subscription_helper->has_subscription( $wc_order->get_id() )