• beezsolutions

    (@beezsolutions)


    Issue Description: I have encountered an issue where the checkout process fails with an error when a product bundle, created using YITH WooCommerce Product Bundles Premium, includes a product that is normally sold at a discounted price. It’s important to note that while these products are normally discounted, they are not discounted when included in the bundle. When such a bundle is added to the cart and a customer proceeds to checkout, the system encounters an error, preventing the completion of the checkout process.

    The error seems to originate from a segment of code in the WooCommerce Smart COD plugin that handles product types and categories for COD availability. The error message suggests there’s an issue with calling a method on a boolean, indicating that wc_get_product returns false for a product ID, leading to a fatal error when attempting to access the get_type() method on a non-object.

    Here is a snippet from the error log for your reference:

    PHP Fatal error: Uncaught Error: Call to a member function get_type() on bool in /wp-content/plugins/wc-smart-cod/public/class-wc-smart-cod-public.php:817

    Steps to Reproduce:

    1. Create a product bundle using YITH WooCommerce Product Bundles Premium.
    2. Include in the bundle a product that has a discount applied outside of the bundle context.
    3. Add the bundle to the cart and proceed to the checkout page.

    Expected Behavior: The checkout process should complete without issues, regardless of whether the products included in the bundle have discounts when sold individually.

    Actual Behavior: The checkout process fails with a PHP fatal error when the bundle includes a product that is normally sold at a discount.

    Disabling the WooCommerce Smart COD plugin resolves the issue, but we rely on this plugin for managing our cash on delivery options, so this is not a viable long-term solution.

    Thanks

    GM

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

  • The topic ‘yith woocommerce product bundles premium’ is closed to new replies.