• Resolved slservice33

    (@slservice33)


    Hi, I’m getting a PHP error which I so far cant track down disabling plugins etc. I get the error when I edit an order, change the address or change its status.

    Any ideas where this might be coming from?
    (PHP is 8.1)

    Notice: Function ID was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action('woocommerce_page_wc-orders'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\Admin\Orders\PageController->output, Automattic\WooCommerce\Internal\Admin\Orders\Edit->display, Automattic\WooCommerce\Internal\Admin\Orders\Edit->render_meta_boxes, do_meta_boxes, QuadLayers\QLSE\Controllers\Backend->metabox, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in /var/www/html/mysite.net/wp-includes/functions.php on line 6085

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @slservice33

    The error message you’re seeing is due to the direct access of order properties, which is not recommended. This has been deprecated since WooCommerce 3.0. Instead, you should use the appropriate getter methods. For example, instead of accessing the ID property directly like $order->id, you should use $order->get_id().

    The error seems to originate from a plugin developed by QuadLayers. It’s possible that this plugin hasn’t been updated to comply with the changes in WooCommerce’s latest version. You might need to contact the plugin developer for a possible update or fix.

    In the meantime, you could suppress these notices by setting WP_DEBUG and WP_DEBUG_DISPLAY to false in your wp-config.php file. However, this is not a long-term solution, and it’s still best to update the plugin.

    Please let us know if you need any further assistance.

    Thread Starter slservice33

    (@slservice33)

    Thanks that is very helpful. This is from the search exclude plugin and I have informed the developer.

    Currently it works but with the warning. In the future will it stop working or cause a fatal PHP error ?

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @slservice33,

    It’s great that you’ve informed the developer about the depreciated error from the search exclude plugin. As of now, while it’s functioning with a warning, it’s hard to predict if it will stop working or cause a fatal PHP error in the future.

    Such warnings are usually a sign that a certain function or feature might not be supported in future versions of the plugin. However, this doesn’t necessarily mean it will cause a fatal error. It primarily depends on how the plugin developer updates the plugin to comply with future changes.

    I hope this helps.

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