Support » Plugin: Pricing Deals for WooCommerce » Woocommerce 3.5.3 breaks Cart Cross-Rule Limits

  • Resolved tandsmichael

    (@tandsmichael)


    I noticed that if you are using Woocommerce 3.5.3 and also Cart Cross-Rule Limits rule 5, the plugin breaks your site.
    To recreate:

    • Make a BOGO deal that is added when x products are in the cart
    • Ensure Coupon mode is on in settings
    • Ensure Cart Cross-Rule Limit is set onto option 5 (No woo coupon if deal is applied)
    • Ensure you are using Woocommerce 3.5.3
    • Add products
    • When you reach x products the site will crash on the frontend with error 500.

    The 500 error is related to timeout errors in POST requests on the basket page, this then produces other timeout warnings.
    In the browser console while this error happens you will see multiple ajax warnings, including this:
    {type: "warning", message: "sizeof(): Parameter must be an array or an object that implements Countable", file: "wp-content/plugins/pricing-deals-for-woocommerce/core/vtprd-apply-rules.php", line: 403, stack: Array(15), …}

    The error resolves if you set Cart Cross-rules to default, turn the price deal off or disable the plugin. This error also doesn’t occur on Woocommece 3.5.2 (One of my staging sites which I tested this on was on an older Woocommerce version, thats how I know this to be the case).

    In addition I used WordPress Query Monitor to find an error warning coming from this plugin:
    sizeof(): Parameter must be an array or an object that implements Countable

    I do not know if any other settings are affected by this bug.

    • This topic was modified 10 months, 2 weeks ago by tandsmichael.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Update:
    I just did this on a clean WordPress install

    You must be on Coupon Discount mode to get this error. Unit Price mode works normally.

    Edit:
    I would like to clarify that this problem causes significant speed damage on page load (when the deal hasn’t been added yet) across the entire frontend site.
    When the deal is added, the entire frontend site will crash, every page I tested.
    This doesn’t affect the admin backend, however.

    • This reply was modified 10 months, 2 weeks ago by tandsmichael.
    • This reply was modified 10 months, 2 weeks ago by tandsmichael.
    Plugin Author vark

    (@vark)

    Hi,
    Thanks for the excellent problem assessment.
    I’ve replicated the error in my test environment.
    Working on the issue now.
    Best,
    Vark

    Plugin Author vark

    (@vark)

    Hi,
    Thanks again for the excellent problem report.
    V2.0.0.5 contains a fix for the issue.
    Best,
    Vark

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Woocommerce 3.5.3 breaks Cart Cross-Rule Limits’ is closed to new replies.