Do a less than or equals to check in meta-box-product-data in the case of $date_from being exactly the current time.

This commit is contained in:
Justin Shreve 2015-06-17 12:18:57 +00:00
parent e1130005a5
commit 8ae228f535
1 changed files with 1 additions and 1 deletions

View File

@ -1120,7 +1120,7 @@ class WC_Meta_Box_Product_Data {
update_post_meta( $post_id, '_price', ( $_POST['_regular_price'] === '' ) ? '' : wc_format_decimal( $_POST['_regular_price'] ) );
}
if ( '' !== $_POST['_sale_price'] && $date_from && strtotime( $date_from ) < strtotime( 'NOW', current_time( 'timestamp' ) ) ) {
if ( '' !== $_POST['_sale_price'] && $date_from && strtotime( $date_from ) <= strtotime( 'NOW', current_time( 'timestamp' ) ) ) {
update_post_meta( $post_id, '_price', wc_format_decimal( $_POST['_sale_price'] ) );
}