| @@ 620-624 (lines=5) @@ | ||
| 617 | update_post_meta( $product_id, '_price', $sale_price ); |
|
| 618 | } |
|
| 619 | ||
| 620 | if ( $date_to && strtotime( $date_to ) < strtotime( 'NOW', current_time( 'timestamp' ) ) ) { |
|
| 621 | update_post_meta( $product_id, '_price', $regular_price ); |
|
| 622 | update_post_meta( $product_id, '_sale_price_dates_from', '' ); |
|
| 623 | update_post_meta( $product_id, '_sale_price_dates_to', '' ); |
|
| 624 | } |
|
| 625 | } |
|
| 626 | ||
| 627 | /** |
|
| @@ 1432-1436 (lines=5) @@ | ||
| 1429 | update_post_meta( $variation_id, '_price', $sale_price ); |
|
| 1430 | } |
|
| 1431 | ||
| 1432 | if ( $date_to && strtotime( $date_to ) < strtotime( 'NOW', current_time( 'timestamp' ) ) ) { |
|
| 1433 | update_post_meta( $variation_id, '_price', $regular_price ); |
|
| 1434 | update_post_meta( $variation_id, '_sale_price_dates_from', '' ); |
|
| 1435 | update_post_meta( $variation_id, '_sale_price_dates_to', '' ); |
|
| 1436 | } |
|
| 1437 | ||
| 1438 | if ( isset( $variable_tax_class[ $i ] ) && $variable_tax_class[ $i ] !== 'parent' ) { |
|
| 1439 | update_post_meta( $variation_id, '_tax_class', wc_clean( $variable_tax_class[ $i ] ) ); |
|