if ( doing_action( 'save_post' ) ) {
                $GLOBALS['wpdb']->update( $GLOBALS['wpdb']->posts, $post_data, array( 'ID' => $order->get_id() ) );
                clean_post_cache( $order->get_id() );
            } else {
                wp_update_post( array_merge( array( 'ID' => $order->get_id() ), $post_data ) );