Make sure the changes includes either $name or $order_id

This commit is contained in:
Cesar Rodas 2017-03-28 08:47:01 -04:00
parent f2f6d76f6d
commit 55ba115ac5
1 changed files with 1 additions and 1 deletions

View File

@ -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(),