Core actually changes the status when the order goes from pending -> any other status unless you’re manually setting processing.
Thread Starter
ronza
(@ronza)
It is not changing here. The customer make the order 18/05 but only pay 20/05. Then 20/05 change the status to processsing but the order date didn’t change and stay 18/05. Got it?
I hope you can help me and thanks for your reply! 🙂
Did the order status change on it’s own, or did you do it? Maybe this is something I fixed in 2.6 (next release). I just tested locally and it was fine.
Thread Starter
ronza
(@ronza)
The order status change automatically, but the date not. The date continue being on the same day that the order were made and don’t change to the date of payment.
Thread Starter
ronza
(@ronza)
I opened my file and it looks the same as yours.
There is a plugin that change wc- for rs-, maybe it is causing the problem.
I’ll test changing to wc- again and if it work, I came back to tell and close the topic.
Thanks for your help Mike! 🙂
Thread Starter
ronza
(@ronza)
Unfortunately it didn’t work. 🙁
Is there any piece of code that I can add in the fuction.php file?
I don’t know what is causing it. :/
Share your status report.
Thread Starter
ronza
(@ronza)
Hi Mike, Claudio Sanches Help me finding a solution.
Just paste this code at functions.php
function my_custom_payment_complete_date( $order_id ) {
wp_update_post( array( 'ID' => $order_id, 'post_date' => current_time( 'mysql' ) ) );
}
add_action( 'woocommerce_payment_complete', 'my_custom_payment_complete_date' );
Thanks for your support!