From 48822ba710570832bbc0ffb9b6c3470e25e7bf29 Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Thu, 15 Jun 2017 08:53:57 -0400 Subject: Update jetpack 5.0 Signed-off-by: Anthony G. Basile --- .../sync/class.jetpack-sync-module-woocommerce.php | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'plugins/jetpack/sync/class.jetpack-sync-module-woocommerce.php') diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-woocommerce.php b/plugins/jetpack/sync/class.jetpack-sync-module-woocommerce.php index a60fe3a5..0eac6e1b 100644 --- a/plugins/jetpack/sync/class.jetpack-sync-module-woocommerce.php +++ b/plugins/jetpack/sync/class.jetpack-sync-module-woocommerce.php @@ -4,17 +4,34 @@ require_once JETPACK__PLUGIN_DIR . '/sync/class.jetpack-sync-module.php'; class Jetpack_Sync_Module_WooCommerce extends Jetpack_Sync_Module { - private $meta_whitelist = array( + private $order_item_meta_whitelist = array( + // https://github.com/woocommerce/woocommerce/blob/master/includes/data-stores/class-wc-order-item-product-store.php#L20 '_product_id', '_variation_id', '_qty', + // Tax ones also included in below class + // https://github.com/woocommerce/woocommerce/blob/master/includes/data-stores/class-wc-order-item-fee-data-store.php#L20 '_tax_class', + '_tax_status', '_line_subtotal', '_line_subtotal_tax', '_line_total', '_line_tax', '_line_tax_data', - '_visibility', + // https://github.com/woocommerce/woocommerce/blob/master/includes/data-stores/class-wc-order-item-shipping-data-store.php#L20 + 'method_id', + 'cost', + 'total_tax', + 'taxes', + // https://github.com/woocommerce/woocommerce/blob/master/includes/data-stores/class-wc-order-item-tax-data-store.php#L20 + 'rate_id', + 'label', + 'compound', + 'tax_amount', + 'shipping_tax_amount', + // https://github.com/woocommerce/woocommerce/blob/master/includes/data-stores/class-wc-order-item-coupon-data-store.php + 'discount_amount', + 'discount_amount_tax', ); private $order_item_table_name; @@ -81,7 +98,7 @@ class Jetpack_Sync_Module_WooCommerce extends Jetpack_Sync_Module { return array( $order_items, - $this->get_metadata( $order_item_ids, 'order_item', $this->meta_whitelist ) + $this->get_metadata( $order_item_ids, 'order_item', $this->order_item_meta_whitelist ), ); } -- cgit v1.2.3-65-gdbad