WC_Product_Download::set_enabled()publicWC 1.0

Sets the status of the download to enabled (true) or disabled (false).

Метод класса: WC_Product_Download{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$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.
По умолчанию: true

Код WC_Product_Download::set_enabled() WC 8.7.0

public function set_enabled( bool $enabled = true ) {
	$this->data['enabled'] = $enabled;
}