• Hello! We are using your plugin for a couple of websites and we have been experiencing this error for a while:

    Warning: Attempt to read property "ID" on int

    The error comes from this part of the code: https://ibb.co/j67JBb0

    This error only seems to appear when we update the products via WP-CRON (we sync the products from an ERP).

    We use this plugin on more sites, but it only appears on this one: specifically, the only website were we add/update products via CRON.

    It seems that the function Breeze_PurgeCache::breeze_cache_flush is expecting a WP_Post object, but its getting an int (I imagine it is the ID of the post).

    Normally, this wouldn’t be an issue for us, but since this error happens very, very often, we wanted to report this to you in hope that you can give us assistance or fix it ??

    • Plugin version: ?2.1.3
    • WordPress version: 6.4.1
    • WooCommerce version: 7.3.0
    • PHP Version: 8.1
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author adeelkhan

    (@adeelkhan)

    Thank you for providing the details.

    Could you please share the structure of your CRON job request?

    Thread Starter Santiago Degetau

    (@tausworks)

    Sharing the code is not possible because of legal reasons and also because the code is over 1k lines. Nonetheless, I can give you an overview of what we do:

    • We disabled WP-CRON and opted for the server CRON (so we have reliable calls and not whenever there is a visit to the website).
    • We sync the products every 15 minutes.
    • We fetch all the products from the ERP, we check if they exist and create or update accordingly (we only update if there was a change to the product).
    • Now, I assume the Breeze_PurgeCache::breeze_cache_flush is called whenever we call $product->save(). So, some info about that: when creating a product, we call it twice — because we need to ensure a post ID — and then we call it once for every variation (if it is a variable product). When updating, we call it once for every variation and once for the parent product.

    Let me know if this info is what you were looking for ??

    Plugin Author adeelkhan

    (@adeelkhan)

    Thank you for sharing the details. We appreciate your input, and we will certainly look into it and provide a solution. I have forwarded it to our development team for further investigation.

    We value your use of our plugin and welcome any feedback you may have. If you encounter any further confusion, please feel free to ask. Thank you again for choosing our services.

    Thread Starter Santiago Degetau

    (@tausworks)

    Thank you!
    Let us know if this issue is fixed in the future ??

    Plugin Author owaisalam

    (@owaisalam)

    Just want to inform you that we have developed a fix for your concern, and it is currently under QA. Once QA is complete, we will release it.

    Plugin Author owaisalam

    (@owaisalam)

    Please update to the latest version of Breeze (2.1.10), which contains the fix for your concern.

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