[2.5] Clear sale price on save if sale is no longer valid.
Closes #10454
This commit is contained in:
parent
c21b0eda82
commit
89e8404acb
|
@ -1012,6 +1012,7 @@ class WC_Meta_Box_Product_Data {
|
|||
|
||||
if ( $date_to && strtotime( $date_to ) < strtotime( 'NOW', current_time( 'timestamp' ) ) ) {
|
||||
update_post_meta( $post_id, '_price', '' === $regular_price ? '' : wc_format_decimal( $regular_price ) );
|
||||
update_post_meta( $post_id, '_sale_price', '' );
|
||||
update_post_meta( $post_id, '_sale_price_dates_from', '' );
|
||||
update_post_meta( $post_id, '_sale_price_dates_to', '' );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue