• Resolved Monoloid

    (@monoloid)


    Hi, does anyone have any idea why I get lots of this error?:

    id was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action(‘wp_ajax_woocos_setup_deactivation_form_ajaxPost’), WP_Hook->do_action, WP_Hook->apply_filters, woocos_setup_deactivation_form_ajaxPost, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @monoloid

    The error message you’re seeing is due to direct access to order properties, which has been deprecated since WooCommerce version 3.0. Instead of directly accessing the properties, you should use the appropriate getter methods.

    For instance, instead of $order->id, you should use $order->get_id().

    Please review your code and replace any direct property access with the appropriate getter methods.

    You can also run a conflict test to help you identify where the code is being used. More info: https://woocommerce.com/document/how-to-test-for-conflicts/

    If you need further assistance, don’t hesitate to ask. We’re here to help.

    Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @monoloid

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, you were able to find a solution to your problem!

    If you have further questions, please feel free to open a new topic.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘id was called incorrectly’ is closed to new replies.