From 5446cb441320876feada2fea60447eeb35dd5a55 Mon Sep 17 00:00:00 2001 From: Marco Almeida Date: Tue, 29 Aug 2023 18:07:16 +0100 Subject: [PATCH] Do not remove "sale date from" when the sale is still active Do not remove "sale date from" when the sale is still active, as in some legislations it's mandatory to show the start and end date of sales, and developers can get it from this field. Closes #34696 --- plugins/woocommerce/includes/wc-product-functions.php | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/woocommerce/includes/wc-product-functions.php b/plugins/woocommerce/includes/wc-product-functions.php index da041dbb0ea..aa4825986d1 100644 --- a/plugins/woocommerce/includes/wc-product-functions.php +++ b/plugins/woocommerce/includes/wc-product-functions.php @@ -448,7 +448,6 @@ function wc_scheduled_sales() { if ( $sale_price ) { $product->set_price( $sale_price ); - $product->set_date_on_sale_from( '' ); } else { $product->set_date_on_sale_to( '' ); $product->set_date_on_sale_from( '' );