mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Ensure subscriptions mode setting exist
This commit is contained in:
parent
ba77510e2e
commit
1d0d4d21ad
1 changed files with 3 additions and 1 deletions
|
@ -102,7 +102,9 @@ class PayPalSubscriptionsModule implements ModuleInterface {
|
|||
$product = wc_get_product( $product_id );
|
||||
|
||||
$settings = $c->get( 'wcgateway.settings' );
|
||||
$subscriptions_mode = $settings->get( 'subscriptions_mode' );
|
||||
assert($settings instanceof Settings);
|
||||
|
||||
$subscriptions_mode = $settings->has( 'subscriptions_mode' ) ? $settings->get( 'subscriptions_mode' ) : '';
|
||||
|
||||
if ( 'subscriptions_api' !== $subscriptions_mode ) {
|
||||
if ( $product && $product->get_sold_individually() ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue