Skip to content

Commit

Permalink
Use id to check if is mollie gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Dec 20, 2024
1 parent f18224b commit 863b1c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Gateway/OrderMandatoryGatewayDisabler.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function processGateways(array $gateways): array
return array_filter(
$gateways,
static function ($gateway) use ($paymentMethods) {
if (!($gateway instanceof PaymentGateway)) {
if (! mollieWooCommerceIsMollieGateway($gateway)) {
return true;
}
$gatewayId = $gateway->id;
Expand Down
2 changes: 1 addition & 1 deletion src/Gateway/Voucher/MaybeDisableGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function maybeDisableMealVoucherGateway(?array $gateways): array
}
$mealVoucherGatewayIndex = false;
foreach ($gateways as $key => $gateway) {
if (!($gateway instanceof PaymentGateway)) {
if (! mollieWooCommerceIsMollieGateway($gateway)) {
continue;
}
if ($gateway->id === 'mollie_wc_gateway_voucher') {
Expand Down

0 comments on commit 863b1c9

Please sign in to comment.