WC_Product_Download::set_enabled
Sets the status of the download to enabled (true) or disabled (false).
Method of the class: WC_Product_Download{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Product_Download = new WC_Product_Download(); $WC_Product_Download->set_enabled( $enabled );
- $enabled(true|false)
- True indicates the downloadable file is enabled, false indicates it is disabled.
Default:true
WC_Product_Download::set_enabled() WC Product Download::set enabled code WC 10.8.1
public function set_enabled( bool $enabled = true ) {
$this->data['enabled'] = $enabled;
}