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
This commit is contained in:
parent
db9cb4db4b
commit
5446cb4413
|
@ -448,7 +448,6 @@ function wc_scheduled_sales() {
|
||||||
|
|
||||||
if ( $sale_price ) {
|
if ( $sale_price ) {
|
||||||
$product->set_price( $sale_price );
|
$product->set_price( $sale_price );
|
||||||
$product->set_date_on_sale_from( '' );
|
|
||||||
} else {
|
} else {
|
||||||
$product->set_date_on_sale_to( '' );
|
$product->set_date_on_sale_to( '' );
|
||||||
$product->set_date_on_sale_from( '' );
|
$product->set_date_on_sale_from( '' );
|
||||||
|
|
Loading…
Reference in New Issue