Skip to content

Commit d2201d7

Browse files
authored
Merge pull request #176 from paynl/feature/PLUG-4791
PLUG-4791 - Resolve foreach warning
2 parents 0b09ed9 + ff5cfe7 commit d2201d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

includes/classes/PPMFWC/Gateway/Abstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ public function is_available()
491491
}
492492
}
493493

494-
if (is_array($arrShippingAllowed) && !in_array('all', $arrShippingAllowed)) {
494+
if (is_array($arrShippingAllowed) && !in_array('all', $arrShippingAllowed) && !empty($shippingMethods)) {
495495
foreach ($shippingMethods as $shippingMethod) {
496496
if (!in_array($shippingMethod, $arrShippingAllowed)) {
497497
return false;

0 commit comments

Comments
 (0)