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 696643ef627..dd34a68623d 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 @@ -111,7 +111,6 @@ abstract class Abstract_WC_Order_Item_Type_Data_Store extends WC_Data_Store_WP i 'type' => $data->order_item_type, ) ); $item->read_meta_data(); - $item->set_object_read( true ); } /** diff --git a/includes/data-stores/class-wc-order-item-coupon-data-store.php b/includes/data-stores/class-wc-order-item-coupon-data-store.php index e18aefc1746..ffc36073226 100644 --- a/includes/data-stores/class-wc-order-item-coupon-data-store.php +++ b/includes/data-stores/class-wc-order-item-coupon-data-store.php @@ -31,6 +31,7 @@ class WC_Order_Item_Coupon_Data_Store extends Abstract_WC_Order_Item_Type_Data_S 'discount' => get_metadata( 'order_item', $item->get_id(), 'discount_amount', true ), 'discount_tax' => get_metadata( 'order_item', $item->get_id(), 'discount_amount_tax', true ), ) ); + $item->set_object_read( true ); } /** diff --git a/includes/data-stores/class-wc-order-item-fee-data-store.php b/includes/data-stores/class-wc-order-item-fee-data-store.php index ea713ce9897..9db65b0787c 100644 --- a/includes/data-stores/class-wc-order-item-fee-data-store.php +++ b/includes/data-stores/class-wc-order-item-fee-data-store.php @@ -32,6 +32,7 @@ class WC_Order_Item_Fee_Data_Store extends Abstract_WC_Order_Item_Type_Data_Stor 'total' => get_metadata( 'order_item', $item->get_id(), '_line_total', true ), 'taxes' => get_metadata( 'order_item', $item->get_id(), '_line_tax_data', true ), ) ); + $item->set_object_read( true ); } /** diff --git a/includes/data-stores/class-wc-order-item-product-store.php b/includes/data-stores/class-wc-order-item-product-store.php index 86f59646ec1..6876c918d65 100644 --- a/includes/data-stores/class-wc-order-item-product-store.php +++ b/includes/data-stores/class-wc-order-item-product-store.php @@ -35,6 +35,7 @@ class WC_Order_Item_Product_Data_Store extends Abstract_WC_Order_Item_Type_Data_ 'total' => get_metadata( 'order_item', $item->get_id(), '_line_total', true ), 'taxes' => get_metadata( 'order_item', $item->get_id(), '_line_tax_data', true ), ) ); + $item->set_object_read( true ); } /** diff --git a/includes/data-stores/class-wc-order-item-shipping-data-store.php b/includes/data-stores/class-wc-order-item-shipping-data-store.php index 843b0a12794..14df754a5a9 100644 --- a/includes/data-stores/class-wc-order-item-shipping-data-store.php +++ b/includes/data-stores/class-wc-order-item-shipping-data-store.php @@ -31,6 +31,7 @@ class WC_Order_Item_Shipping_Data_Store extends Abstract_WC_Order_Item_Type_Data 'total' => get_metadata( 'order_item', $item->get_id(), 'cost', true ), 'taxes' => get_metadata( 'order_item', $item->get_id(), 'taxes', true ), ) ); + $item->set_object_read( true ); } /** diff --git a/includes/data-stores/class-wc-order-item-tax-data-store.php b/includes/data-stores/class-wc-order-item-tax-data-store.php index f122c651ab9..037fa1239ca 100644 --- a/includes/data-stores/class-wc-order-item-tax-data-store.php +++ b/includes/data-stores/class-wc-order-item-tax-data-store.php @@ -33,6 +33,7 @@ class WC_Order_Item_Tax_Data_Store extends Abstract_WC_Order_Item_Type_Data_Stor 'tax_total' => get_metadata( 'order_item', $item->get_id(), 'tax_amount', true ), 'shipping_tax_total' => get_metadata( 'order_item', $item->get_id(), 'shipping_tax_amount', true ), ) ); + $item->set_object_read( true ); } /**