Support » Plugin: WooCommerce Product Addons » Fatal error when used with Product Bundles plugin

  • Resolved Srini G

    (@srinig)



    I use this plugin for a client website to add additional items to a particular product using checkboxes. The website also uses the WooCommerce Product Bundles Plugin.

    Now, when the item checkboxes are checked and the product is added to the cart, this fatal error message appears.

    Fatal error: Call to undefined function wc_pb_is_bundled_cart_item() in /wp-content/plugins/woocommerce-product-addon/inc/woocommerce.php on line 167

    When I comment out lines 167-169, the following error message appears in the cart page.

    Fatal error: Call to undefined function wc_pb_is_bundled_cart_item() in /wp-content/plugins/woocommerce-product-addon/inc/woocommerce.php on line 466

    And when I comment out lines 466 to 468, the error message disappears and things work as expected, or so it seems for now.

    Please fix this as soon as possible.

    • This topic was modified 1 month ago by  Srini G. Reason: Added link to related plugin
Viewing 7 replies - 1 through 7 (of 7 total)
  • Srini G

    (@srinig)

    One more instance of the same function call resulting in fatal error at line 799 of the same file.

    darkallman

    (@darkallman)

    Are you on the latest version of product bundles?

    Plugin Author nmedia

    (@nmedia)

    Hi @srinig,

    make sure you have latest version of Bundle plugin. We have check in place to see if bundle plugin is installed like:

    if ( class_exists('WC_Bundles') && wc_pb_is_bundled_cart_item( $cart_item )) {

    Plugin Author nmedia

    (@nmedia)

    By the way changed this check on function like:

    if ( function_exists('wc_pb_is_bundled_cart_item') && wc_pb_is_bundled_cart_item( $cart_item )) {

    it will be available from 15.3

    darkallman

    (@darkallman)

    Excellent!

    Srini G

    (@srinig)

    Thanks for the response. In fact, the website was not running the latest version of the bundles plugin. All is good now. Anyway, it’s a good idea to check with function_exists to cover up this kind of a situation. Thanks.

    Plugin Author nmedia

    (@nmedia)

    Thanks, @darkallman @srinig if you love our plugin, please rate us to make this PPOM one of the best WooCommerce Addon

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.