Thread Starter
mic6
(@mic6)
Ah of course.. Thanks working perfectly now.
Thread Starter
mic6
(@mic6)
@icaleb any idea what could be wrong?
Thread Starter
mic6
(@mic6)
For some reason it’s not quite working.
I tried with set_date_completed( ‘2018-08-25’ ) and the one below, no difference, no errors, but no changes to order date. If i print out the order details, I can see it’s the right order it’s trying to change.
function change_order_details() {
$order_id=115;
$order = wc_get_order( $order_id );
$order->set_date_completed( ‘2017-10-16 13:48:10’ );
}
add_action( ‘wp_head’, ‘change_order_details’ );
Am i missing something?
Thread Starter
mic6
(@mic6)
Thanks Caleb, very good suggestion