From 55ba115ac535493abd6ab6d08dd689afdef82511 Mon Sep 17 00:00:00 2001 From: Cesar Rodas Date: Tue, 28 Mar 2017 08:47:01 -0400 Subject: [PATCH] Make sure the changes includes either $name or $order_id --- includes/data-stores/abstract-wc-order-item-type-data-store.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/data-stores/abstract-wc-order-item-type-data-store.php b/includes/data-stores/abstract-wc-order-item-type-data-store.php index 1e7105e3ee5..13c05c45ab5 100644 --- a/includes/data-stores/abstract-wc-order-item-type-data-store.php +++ b/includes/data-stores/abstract-wc-order-item-type-data-store.php @@ -61,7 +61,7 @@ abstract class Abstract_WC_Order_Item_Type_Data_Store extends WC_Data_Store_WP i $changes = $item->get_changes(); - if ( ! empty( $changes ) ) { + if ( array_intersect( array( 'name', 'order_id' ), array_keys( $changes ) ) ) { $wpdb->update( $wpdb->prefix . 'woocommerce_order_items', array( 'order_item_name' => $item->get_name(), 'order_item_type' => $item->get_type(),