Skip to content

Commit e2fc21f

Browse files
PLUG-4791 - Resolve foreach warning
1 parent f8d4789 commit e2fc21f

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)