Skip to content

Commit 3316e3b

Browse files
committed
Fixed instore issues
1 parent ecd1e74 commit 3316e3b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

includes/classes/PPMFWC/Gateways.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ public static function getOrderReturnUrl(WC_Order $order, $newStatus, $orderStat
905905
$payStatus = new PayStatus();
906906
$method = $order->get_payment_method() ?? '';
907907

908-
if ($method == 'pay_gateway_instore') {
908+
if ($method == 'pay_gateway_instore' && (in_array($newStatus, [PPMFWC_Gateways::STATUS_CANCELED, PPMFWC_Gateways::STATUS_PENDING]))) {
909909
$url = add_query_arg('paynl_status', PPMFWC_Gateways::STATUS_CANCELED, wc_get_checkout_url());
910910

911911
} elseif ($payStatus->get($orderStatusId) === PayStatus::CANCEL) {

0 commit comments

Comments
 (0)