Use timestamp function

This commit is contained in:
Mike Jolley 2017-12-07 15:24:57 +00:00
parent 6374a13d30
commit 54d4012c33
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ function wc_update_product_stock( $product, $stock_quantity = null, $operation =
// Re-read product data after updating stock, then have stock status calculated and saved.
$product_with_stock = wc_get_product( $product_id_with_stock );
$product_with_stock->set_stock_status();
$product_with_stock->set_date_modified( date() );
$product_with_stock->set_date_modified( current_time( 'timestamp', true ) );
$product_with_stock->save();
do_action( $product_with_stock->is_type( 'variation' ) ? 'woocommerce_variation_set_stock' : 'woocommerce_product_set_stock', $product_with_stock );