mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Merge pull request #2362 from woocommerce/PCP-3300-server-500-error-when-adding-to-cart-1-product-if-pcp-is-activated
2.8.1-alpha1 - Server 500 error when adding to cart >1 product if PCP is activated (3300)
This commit is contained in:
commit
b40b1d2056
1 changed files with 4 additions and 2 deletions
|
@ -101,8 +101,10 @@ class PayPalSubscriptionsModule implements ModuleInterface {
|
|||
|
||||
$product = wc_get_product( $product_id );
|
||||
|
||||
$settings = $c->get( 'wcgateway.settings' );
|
||||
$subscriptions_mode = $settings->get( 'subscriptions_mode' );
|
||||
$settings = $c->get( 'wcgateway.settings' );
|
||||
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