From 1d29b36c4c75b38dde2d89adb9eac6d86f5a238a Mon Sep 17 00:00:00 2001 From: Peter Fabian Date: Wed, 15 May 2019 15:46:53 +0200 Subject: [PATCH] Removed comments that are no longer relevant. --- includes/wc-stock-functions.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/includes/wc-stock-functions.php b/includes/wc-stock-functions.php index 4b4b9a45c06..ad068c41401 100644 --- a/includes/wc-stock-functions.php +++ b/includes/wc-stock-functions.php @@ -39,11 +39,9 @@ function wc_update_product_stock( $product, $stock_quantity = null, $operation = $data_store = WC_Data_Store::load( 'product' ); // Update the database. - // This can fail, i.e. not update stock level if the record is locked and will then return 'old' stock level. $new_stock = $data_store->update_product_stock( $product_id_with_stock, $stock_quantity, $operation ); // Update the product object. - // Force product object stock level to be updated to the value we just persisted (or the value from the db, if not persisted due to lock). $data_store->read_stock_quantity( $product_with_stock, $new_stock ); // If this is not being called during an update routine, save the product so stock status etc is in sync, and caches are cleared.