Cached orders?
-
WC v3.7.0
How are you caching the orders? Why do the orders not match the actual WP_Post after a status change?
File class-wc-order.php in the set_status() function:
do_action( ‘woocommerce_order_edit_status’, $this->get_id(), $result[‘to’] );
Above that line, do this:
$post = get_post( $this->get_id() );
echo sprintf( ‘Changing order %s status to %s: %s’, $this->get_id(), $new_status, $post->post_status );You will notice that $new_status is NOT the same as $post->post_status.
Why not, and how do I commit the order changes to disk?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Cached orders?’ is closed to new replies.