WC_Product::set_date_on_sale_to()publicWC 3.0.0

Set date on sale to.

{} It's a method of the class: WC_Product{}

No Hooks.


null. Nothing.


$WC_Product = new WC_Product();
$WC_Product->set_date_on_sale_to( $date );
UTC timestamp, or ISO 8601 DateTime. If the DateTime string has no timezone or offset, WordPress site timezone will be assumed. Null if their is no date.
Default: null


Since 3.0.0 Introduced.

Code of WC_Product::set_date_on_sale_to() WC 6.9.4

public function set_date_on_sale_to( $date = null ) {
	$this->set_date_prop( 'date_on_sale_to', $date );