Skip to content

Commit

Permalink
Fix paypal button
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Jan 30, 2025
1 parent 0b042c2 commit 21c551e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Gateway/inc/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@
$logger = $container->get(Logger::class);
assert($logger instanceof Logger);
$paymentGateways = $container->get('payment_gateways');
$paypalGateway = isset($paymentGateways['mollie_wc_gateway_paypal']) ? $paymentGateways['mollie_wc_gateway_paypal'] : false;
if (!$paypalGateway) {
if (!in_array('mollie_wc_gateway_paypal', $paymentGateways)) {
return false;
}
$paypalGateway = new Inpsyde\PaymentGateway\PaymentGateway('mollie_wc_gateway_paypal', $container);
$pluginUrl = $container->get('shared.plugin_url');
$ajaxRequests = new PayPalAjaxRequests($paypalGateway, $notice, $logger);
$data = new DataToPayPal($pluginUrl);
Expand Down

0 comments on commit 21c551e

Please sign in to comment.