• Paul

    (@headwall)


    Hi

    A client is experiencing the following fatal PHP error:

    PHP Fatal error:  Uncaught Error: Call to a member function get_type() on false in /web/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-subscriptions/src/Helper/SubscriptionHelper.php:183

    I think we need to check if $product is really an instance of WC_Product, otherwise the subsequent call to $product->get_type() fails hard.

    For reference, this client’s site isn’t even running the WooCommerce subscriptions plugin. So why is this code even being called? Can we just switch out the PayPal Subscription module when it’s not needed?

    Paul

Viewing 1 replies (of 1 total)
  • Plugin Support Syde Jamie

    (@jamieong)

    Hi @headwall ,

    Thank you for reaching out to us.

    We are looking into the issue you reported. Meanwhile you can add this snippet to your theme’s functions.php or use a code snippets plugin:

    add_filter( 'woocommerce_paypal_payments_subscription_mode_disabled', '__return_true' );

    This filter is used in multiple places to disable subscription functionality when WooCommerce Subscriptions is not active or not needed.

    Can you also share the system status report? Please follow these steps to share your system status report with us:

    1. Navigate to the WooCommerce / Status section in your site’s admin panel.
    2. Click on the Get system report button and then click Copy for support.
    3. Paste the report into our PrivateBin.
    4. After uploading, please share the link here so we can review the details thoroughly.

    Alternatively, to speed up the whole process we suggest you to contact us directly for further assistance. You can open a ticket with our service desk. Here’s how you can request support: Request Support. Please make sure to include the URL of this thread in your ticket for reference.

    Best Regards,
    Jamie

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.