summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/sync/class.jetpack-sync-module-posts.php')
-rw-r--r--plugins/jetpack/sync/class.jetpack-sync-module-posts.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-posts.php b/plugins/jetpack/sync/class.jetpack-sync-module-posts.php
index 4824aeaa..f7cc2bff 100644
--- a/plugins/jetpack/sync/class.jetpack-sync-module-posts.php
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-posts.php
@@ -227,7 +227,7 @@ class Jetpack_Sync_Module_Posts extends Jetpack_Sync_Module {
global $post;
$post = $post_object;
- // return non existant post
+ // return non existant post
$post_type = get_post_type_object( $post->post_type );
if ( empty( $post_type ) || ! is_object( $post_type ) ) {
$non_existant_post = new stdClass();
@@ -345,6 +345,11 @@ class Jetpack_Sync_Module_Posts extends Jetpack_Sync_Module {
$just_published = true;
}
+ // workaround for https://github.com/woocommerce/woocommerce/issues/18007
+ if ( $post && 'shop_order' === $post->post_type ) {
+ $post = get_post( $post_ID );
+ }
+
call_user_func( $this->action_handler, $post_ID, $post, $update, $is_auto_save, $just_published );
$this->send_published( $post_ID, $post );
$this->send_trashed( $post_ID, $post );