| @@ 1423-1427 (lines=5) @@ | ||
| 1420 | update_post_meta( $variation_id, '_price', $sale_price ); |
|
| 1421 | } |
|
| 1422 | ||
| 1423 | if ( $date_to && strtotime( $date_to ) < strtotime( 'NOW', current_time( 'timestamp' ) ) ) { |
|
| 1424 | update_post_meta( $variation_id, '_price', $regular_price ); |
|
| 1425 | update_post_meta( $variation_id, '_sale_price_dates_from', '' ); |
|
| 1426 | update_post_meta( $variation_id, '_sale_price_dates_to', '' ); |
|
| 1427 | } |
|
| 1428 | ||
| 1429 | if ( isset( $variable_tax_class[ $i ] ) && $variable_tax_class[ $i ] !== 'parent' ) { |
|
| 1430 | update_post_meta( $variation_id, '_tax_class', wc_clean( $variable_tax_class[ $i ] ) ); |
|
| @@ 625-629 (lines=5) @@ | ||
| 622 | update_post_meta( $product_id, '_price', $sale_price ); |
|
| 623 | } |
|
| 624 | ||
| 625 | if ( $date_to && strtotime( $date_to ) < strtotime( 'NOW', current_time( 'timestamp' ) ) ) { |
|
| 626 | update_post_meta( $product_id, '_price', $regular_price ); |
|
| 627 | update_post_meta( $product_id, '_sale_price_dates_from', '' ); |
|
| 628 | update_post_meta( $product_id, '_sale_price_dates_to', '' ); |
|
| 629 | } |
|
| 630 | } |
|
| 631 | ||
| 632 | /** |
|