WC_Product::set_download_expiry()
Set download expiry.
Method of the class: WC_Product{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Product = new WC_Product(); $WC_Product->set_download_expiry( $download_expiry );
- $download_expiry(int|string) (required)
- Product download expiry.
Changelog
Since 3.0.0 | Introduced. |
WC_Product::set_download_expiry() WC Product::set download expiry code WC 9.7.1
public function set_download_expiry( $download_expiry ) { $this->set_prop( 'download_expiry', -1 === (int) $download_expiry || '' === $download_expiry ? -1 : absint( $download_expiry ) ); }