• Resolved Tim

    (@timwakeling-1)


    Hi

    We’ve just started getting the following PHP error repeatedly in our logs and people having trouble checking out – any thoughts? Is it a bug in the plugin?

    [15-Oct-2021 10:37:51 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_stock_managed_by_id() on null in /home/watchnat/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php:689
    Stack trace:
    #0 /home/watchnat/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1218): WC_Cart->get_cart_item_quantities()
    #1 /home/watchnat/public_html/wp-content/plugins/woo-discount-rules/v2/App/Helpers/Woocommerce.php(544): WC_Cart->add_to_cart(106844, ‘1’, 0, Array, Array)
    #2 /home/watchnat/public_html/wp-content/plugins/woo-discount-rules-pro/App/Rules/BOGO.php(416): Wdr\App\Helpers\Woocommerce::add_to_cart(‘106844’, ‘1’, 0, Array, Array)
    #3 /home/watchnat/public_html/wp-includes/class-wp-hook.php(292): WDRPro\App\Rules\BOGO::handleAutoAddFreeProductsBXGY(Object(WC_Cart))
    #4 /home/watchnat/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
    #5 /home/watchnat/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #6 /home/watchnat/public_html/wp-content/plugins/woocommerce/in in /home/watchnat/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php on line 689

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @timwakeling-1

    Thanks for reaching out.

    Our dev team had a check and it seems like the issue occurs on Buy X get Y rules when the chosen free product might be deleted.

    Is it possible to create a support ticket here–> https://www.flycart.org/support?
    with the email id used for purchasing our plugin?

    This would help us to verify your purchase and send the updated pack.

    Thanks
    Team Flycart

    I am having the same issue but the items that automatically get added are in stock and are not deleted; I run several buy X get Y rules to encourage customers to spend more money to get more freebie items added to their shopping cart. However when customers add more than 7 items the website says ” Critical Errror ” when they click on checkout to pay for the order.

    kowsaliya

    (@kowsaliya)

    Hi @codyoebel

    Just giving you a heads up, that this issue is fixed in our latest version 2.3.9.
    It would be really helpful if you can reply to the support ticket so that we can have a check and assist you quickly.

    Thanks
    Team Flycart

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP error on cart page’ is closed to new replies.