• seb7100

    (@seb7100)


    I get a fatal error on my website with Yith Extra Product Options. I have disabled the plugin for now, hoping for a quick fix.

    Uncaught Error: Call to a member function get_price() on bool.
    Stack trace:

    #0 /wp-content/plugins/yith-woocommerce-product-add-ons/plugin-fw/yit-woocommerce-compatibility.php(572): wc_get_price_to_display(false, Array)

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • martinlooij

    (@martinlooij)

    waroberterdmann

    (@waroberterdmann)

    Hello, I fixed the bug. The error comes from the file /yith-woocommerce-product-add-ons/includes/class-yith-wapo-cart.php on line 217:

    $_product  = isset( $cart_item['variation_id'] ) ? wc_get_product( $cart_item['variation_id'] ) : wc_get_product( $cart_item['product_id'] );

    change to:

    $_product  = isset( $cart_item['variation_id'] ) && $cart_item['variation_id'] != 0 ? wc_get_product( $cart_item['variation_id'] ) : wc_get_product( $cart_item['product_id'] );

    The variant ID is (INT)0 and cannot find the product.

    Please bring an update. Thanks very much!

    yoteman

    (@yoteman)

    @waroberterdmann it’s works fine, thanks a lot!

    martinlooij

    (@martinlooij)

    Where can you change that code please?

    waroberterdmann

    (@waroberterdmann)

    Hello @martinlooij , the plugin provider has to change that and release an update or you change the plugin code in /wp-content/plugins/yith-woocommerce-product-add-ons/includes/class-yith-wapo-cart.php on line 217

    martinlooij

    (@martinlooij)

    You’re the best! Changed it and it works again.

    kiwiwebworks

    (@kiwiwebworks)

    Thanks that worked! Hopefully this in in a plugin update soon!

    Plugin Support Giuseppe Madaudo

    (@askmagic)

    Hi everyone and thank you to @waroberterdmann.

    We just released a new version of the plugin in order to solve this issue.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Fatal Error’ is closed to new replies.