Thanks flexaftale. Does the error message go on to give the line number in the wc-ac-hook.php file?
The reason I ask is that it has probably been fixed (but not released) yet. Knowing the line number would confirm that for sure.
The error is a warning and should not cause a fatal error. Nonetheless I have changed the method for accessing order attributes to avoid these messages.
I suspect the problem you have is at line 96 which is:
$this->order_status_change ($order_id, null, $order->status);
and should be:
$this->order_status_change ($order_id, null, method_exists($order,’get_status’) ? $order->get_status() : $order->status);
But I need the line number to confirm that.
Hi!
Thanks for the quick reply. I don’t see the line number in our server logs. I could setup WP debug, if that will work?
Even without the line number I am fairly certain it is line 96. The back trace shows ‘WC_AC_Hook->order_created’ which is the method that line 96 falls in.
The bug will be fixed when I release the next version of the plug in. I will do that at some point this year but apart from this bug I don’t have anything to release at the moment. I’m reluctant to make everyone install a new version today just to fix a warning message.
So you have 3 options really:
1) Wait for next version of the plugin. Depending on your technical skills you may want to consider options 2 or 3.
2) Change the line yourself in advance of the next release:
Replace line 96 in wc-ac-hook.php from
$this->order_status_change ($order_id, null, $order->status);
to
$this->order_status_change ($order_id, null, method_exists($order,’get_status’) ? $order->get_status() : $order->status);
3) I can release a development branch of wc-ac-hook so that you can copy and replace the whole wc-ac-hook.php file if you don’t want to edit the line.
Great, I will change line 96 and get back to you, if it does not fix the error. Thank you very much for your quick replies!