Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/Generator/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ protected static function generate_variable_product() {
'regular_price' => $price,
'sale_price' => $sale_price,
'date_on_sale_from' => '',
'date_on_sale_to' => self::$faker->iso8601( date( 'c', strtotime( '+1 month' ) ) ),
'date_on_sale_to' => $is_on_sale ? self::$faker->dateTimeBetween('now', '+1 month')->format(DATE_ATOM) : '',
'tax_status' => 'taxable',
'tax_class' => '',
'manage_stock' => $will_manage_stock,
Expand Down Expand Up @@ -386,7 +386,7 @@ protected static function generate_simple_product() {
'regular_price' => $price,
'sale_price' => $sale_price,
'date_on_sale_from' => '',
'date_on_sale_to' => self::$faker->iso8601( date( 'c', strtotime( '+1 month' ) ) ),
'date_on_sale_to' => $is_on_sale ? self::$faker->dateTimeBetween('now', '+1 month')->format(DATE_ATOM) : '',
'total_sales' => self::$faker->numberBetween( 0, 10000 ),
'tax_status' => 'taxable',
'tax_class' => '',
Expand Down