Fix the PayPal enabled settings key

This commit is contained in:
Daniel Dudzic 2024-08-02 12:30:39 +02:00
parent 70fe162cd2
commit fe8101699f
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
2 changed files with 3 additions and 2 deletions

1
.megaignore Normal file
View file

@ -0,0 +1 @@
-s:*

View file

@ -77,7 +77,7 @@ class AxoModule implements ModuleInterface {
$settings = $c->get( 'wcgateway.settings' );
assert( $settings instanceof Settings );
$is_paypal_enabled = $settings->has( 'paypal_enabled' ) && $settings->get( 'paypal_enabled' ) ?? false;
$is_paypal_enabled = $settings->has( 'enabled' ) && $settings->get( 'enabled' ) ?? false;
$is_dcc_enabled = $settings->has( 'dcc_enabled' ) && $settings->get( 'dcc_enabled' ) ?? false;
if ( ! $is_paypal_enabled || ! $is_dcc_enabled ) {
@ -152,7 +152,7 @@ class AxoModule implements ModuleInterface {
$settings = $c->get( 'wcgateway.settings' );
assert( $settings instanceof Settings );
$is_paypal_enabled = $settings->has( 'paypal_enabled' ) && $settings->get( 'paypal_enabled' ) ?? false;
$is_paypal_enabled = $settings->has( 'enabled' ) && $settings->get( 'enabled' ) ?? false;
$subscription_helper = $c->get( 'wc-subscriptions.helper' );
assert( $subscription_helper instanceof SubscriptionHelper );