From ca24145725f68761f39e25d280e6f09ff996c2b6 Mon Sep 17 00:00:00 2001 From: Matic Luznar Date: Wed, 2 Aug 2023 08:41:53 +0200 Subject: [PATCH] Fix gateway check and query status. --- src/Payment/PaymentModule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Payment/PaymentModule.php b/src/Payment/PaymentModule.php index 1bdef2705..79517660c 100644 --- a/src/Payment/PaymentModule.php +++ b/src/Payment/PaymentModule.php @@ -173,14 +173,14 @@ public function cancelOrderOnExpiryDate() continue; } $heldDurationInSeconds = $heldDuration * 60; - if ($gateway === 'mollie_wc_gateway_bankTransfer') { + if ($gateway === 'Mollie_WC_Gateway_Banktransfer') { $durationInHours = absint($heldDuration) * 24; $durationInMinutes = $durationInHours * 60; $heldDurationInSeconds = $durationInMinutes * 60; } $args = [ 'limit' => -1, - 'status' => 'pending', + 'status' => ['wc-on-hold', 'wc-pending'], 'payment_method' => strtolower($gateway), 'date_modified' => '<' . (time() - $heldDurationInSeconds), 'return' => 'ids',