• Resolved cmsnext

    (@cmsnext)


    I had a query with regards a custom payment gateway that I have added.

    Now the gateway works fine without issues and am able to do transactions. But when I see the error log file there is an error being generated as follows

    id was called incorrectly. Order properties should not be accessed directly. Backtrace: ..., wc_doing_it_wrong. This message was added in version 3.0.
    order_key was called incorrectly. Order properties should not be accessed directly. Backtrace: ..., wc_doing_it_wrong. This message was added in version 3.0.

    The error seems to be generated when we redirect post return from gateway
    'redirect' => add_query_arg( 'order', $order->id, add_query_arg( 'key', $order->order_key,

    I read at a couple of places some suggest that

    $order->id should be changed to $order->get_id()
    and $order->order_key should be changed to $order->get_order_key()

    So can someone confirm thats correct because I dont want to disturb the live gateway.
    Thanks

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

The topic ‘Error log shows id / order_key was called incorrectly’ is closed to new replies.