@@ 2844-2848 (lines=5) @@ | ||
2841 | $date_from = get_post_meta( $variation_id, '_sale_price_dates_from', true ); |
|
2842 | $date_to = get_post_meta( $variation_id, '_sale_price_dates_to', true ); |
|
2843 | ||
2844 | if ( 'false' === $data['date_from'] ) { |
|
2845 | $date_from = ! empty( $date_from ) ? date( 'Y-m-d', $date_from ) : ''; |
|
2846 | } else { |
|
2847 | $date_from = $data['date_from']; |
|
2848 | } |
|
2849 | ||
2850 | if ( 'false' === $data['date_to'] ) { |
|
2851 | $date_to = ! empty( $date_to ) ? date( 'Y-m-d', $date_to ) : ''; |
|
@@ 2850-2854 (lines=5) @@ | ||
2847 | $date_from = $data['date_from']; |
|
2848 | } |
|
2849 | ||
2850 | if ( 'false' === $data['date_to'] ) { |
|
2851 | $date_to = ! empty( $date_to ) ? date( 'Y-m-d', $date_to ) : ''; |
|
2852 | } else { |
|
2853 | $date_to = $data['date_to']; |
|
2854 | } |
|
2855 | ||
2856 | _wc_save_product_price( $variation_id, $regular_price, $sale_price, $date_from, $date_to ); |
|
2857 | } |