mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Fix the PayPal enabled settings key
This commit is contained in:
parent
70fe162cd2
commit
fe8101699f
2 changed files with 3 additions and 2 deletions
1
.megaignore
Normal file
1
.megaignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
-s:*
|
|
@ -77,7 +77,7 @@ class AxoModule implements ModuleInterface {
|
||||||
$settings = $c->get( 'wcgateway.settings' );
|
$settings = $c->get( 'wcgateway.settings' );
|
||||||
assert( $settings instanceof 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;
|
$is_dcc_enabled = $settings->has( 'dcc_enabled' ) && $settings->get( 'dcc_enabled' ) ?? false;
|
||||||
|
|
||||||
if ( ! $is_paypal_enabled || ! $is_dcc_enabled ) {
|
if ( ! $is_paypal_enabled || ! $is_dcc_enabled ) {
|
||||||
|
@ -152,7 +152,7 @@ class AxoModule implements ModuleInterface {
|
||||||
$settings = $c->get( 'wcgateway.settings' );
|
$settings = $c->get( 'wcgateway.settings' );
|
||||||
assert( $settings instanceof 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' );
|
$subscription_helper = $c->get( 'wc-subscriptions.helper' );
|
||||||
assert( $subscription_helper instanceof SubscriptionHelper );
|
assert( $subscription_helper instanceof SubscriptionHelper );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue