summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2017-12-12 20:29:44 -0500
committerAnthony G. Basile <blueness@gentoo.org>2017-12-12 20:29:55 -0500
commit73ce9c10188ce4f5014c97ad4c0f8c9f69410113 (patch)
treeac0b7b2f7cb14a145e2308d705033f89cebc736d /plugins/jetpack/sync/class.jetpack-sync-module-posts.php
parentUpdate wordpress-mobile-pack 3.2 (diff)
downloadblogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.tar.gz
blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.tar.bz2
blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.zip
Update jetpack 5.6
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
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 );