• Resolved backpackingseries

    (@backpackingseries)


    Hi Support,

    I am witnessing the following record in the PHP Log since the past few days (perhaps since this plugin’s last update)

    [13-Dec-2021 09:54:26 UTC] id was called incorrectly. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, do_action('woocommerce_checkout_order_processed'), WP_Hook->do_action, WP_Hook->apply_filters, WSVI_Stock_Change_Helper->wsvi_stock_change_helper, WSVI_Stock_Change_Helper->wsvi_stock_change, WSVI_Stock_Change_Helper->update_group_variations_quantity, wc_update_product_stock, do_action('woocommerce_variation_set_stock'), WP_Hook->do_action, WP_Hook->apply_filters, WPO_Cache_Rules->purge_product_page, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.

    If i disable WP-Optimize plugin, the error goes away.

    Could you please help resolve this?

    Kind regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have the same problem. It is a plugin bug.

    Collaborators have to change line 311 of the file:

    /plugins/wp-optimize/cache/class-wpo-cache-rules.php

    from this:

    if (! empty ($ product_with_stock-> id)) {

    to this:

    if (! empty ($ product_with_stock-> get_id() )) {

    I don’t know where to report the bug. I hope this info is useful to the collaborators.

    Also line 312, from

    WPO_Page_Cache::delete_single_post_cache($product_with_stock->id);

    to

    WPO_Page_Cache::delete_single_post_cache($product_with_stock->get_id());

    regards!

    @panuweb Thanks for sharing the fix, I’ll share the same with our development team to further troubleshoot nd get it fixed in future release.

    Plugin Author David Anderson

    (@davidanderson)

    Hi,

    Thank you – that has been fixed in our development version. N.B. It is a deprecation notice, which means that something will stop working in future versions of WooCommerce – you don’t need to fix it now as an error (it is only informational).

    Also, the original poster has a different issue – that stack trace is due to an issue with the plugin that has the class WSVI_Stock_Change_Helper, which is not WP-O.

    David

    Thread Starter backpackingseries

    (@backpackingseries)

    Thank you @davidanderson for pointing me in the right direction. I am now tracking it with the other plugin authors too.

    Kind regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WooCommerce Error| id was called incorrectly’ is closed to new replies.