• Resolved slservice33

    (@slservice33)


    Hi, looks like according to query monitor, search exclude is calling function ID incorrectly:

    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\SearchExclude\Plugin->metabox, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong (This message was added in version 3.0.)

    Thanks
    Stephen

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support jmatiasmastro

    (@jmatiasmastro)

    Hello Stephen,

    Please share some screenshots to describe your issue.

    You can use this tool to copy/paste your screenshots here easily: https://snipboard.io

    Best regards, QuadLayers Support Team

    Thread Starter slservice33

    (@slservice33)

    Hi, the issue is that I get this PHP error when I edit woocommerce orders with search exclude plugin active.

    When I turn off search exclude plugin the error is not there and using query monitor the backtrace is to :

    Automattic\WooCommerce\Internal\Admin\Orders\Edit->render_meta_boxes, do_meta_boxes, QuadLayers\QLSE\Controllers\Backend->metabox

    I’ve googled the issue and apparently its from accessing Object properties directly, instead use?WC_Order?methods and replace:

    • $order->status?by??$order->get_status()
    • $order->total?by?$order->get_total()

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