Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Register::enable_by_id()publicWC 1.0

Enable the approved directory identitied by the supplied ID.

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

No Hooks.

Return

true|false.

Usage

$Register = new Register();
$Register->enable_by_id( $id ): bool;
$id(int) (required)
The ID of the rule to be deleted.

Code of Register::enable_by_id() WC 7.1.0

public function enable_by_id( int $id ): bool {
	global $wpdb;
	$table = $this->get_table();
	return (bool) $wpdb->update( $table, array( 'enabled' => 1 ), array( 'url_id' => $id ) );
}