| @@ 1413-1417 (lines=5) @@ | ||
| 1410 | } |
|
| 1411 | ||
| 1412 | // Update price if on sale |
|
| 1413 | if ( '' !== $sale_price && '' === $date_to && '' === $date_from ) { |
|
| 1414 | update_post_meta( $variation_id, '_price', $sale_price ); |
|
| 1415 | } else { |
|
| 1416 | update_post_meta( $variation_id, '_price', $regular_price ); |
|
| 1417 | } |
|
| 1418 | ||
| 1419 | if ( '' !== $sale_price && $date_from && strtotime( $date_from ) < strtotime( 'NOW', current_time( 'timestamp' ) ) ) { |
|
| 1420 | update_post_meta( $variation_id, '_price', $sale_price ); |
|
| @@ 615-619 (lines=5) @@ | ||
| 612 | } |
|
| 613 | ||
| 614 | // Update price if on sale |
|
| 615 | if ( '' !== $sale_price && '' === $date_to && '' === $date_from ) { |
|
| 616 | update_post_meta( $product_id, '_price', $sale_price ); |
|
| 617 | } else { |
|
| 618 | update_post_meta( $product_id, '_price', $regular_price ); |
|
| 619 | } |
|
| 620 | ||
| 621 | if ( '' !== $sale_price && $date_from && strtotime( $date_from ) < strtotime( 'NOW', current_time( 'timestamp' ) ) ) { |
|
| 622 | update_post_meta( $product_id, '_price', $sale_price ); |
|