From 5fc67bbd0c853fb0ea06d72d492868dd20e7e629 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 19 Dec 2016 11:22:43 +0000 Subject: [PATCH] Unset changes --- includes/class-wc-order-item.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/class-wc-order-item.php b/includes/class-wc-order-item.php index 513ef4070dc..780f4bf3d20 100644 --- a/includes/class-wc-order-item.php +++ b/includes/class-wc-order-item.php @@ -266,6 +266,10 @@ class WC_Order_Item extends WC_Data implements ArrayAccess { unset( $this->data[ $offset ] ); } + if ( array_key_exists( $offset, $this->changes ) ) { + unset( $this->changes[ $offset ] ); + } + $this->delete_meta_data( '_' . $offset ); }