Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Register::disable_by_id()publicWC 1.0

Disable the approved directory identitied by the supplied ID.

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

Хуков нет.

Возвращает

true|false.

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

$Register = new Register();
$Register->disable_by_id( $id ): bool;
$id(int) (обязательный)
The ID of the rule to be deleted.

Код Register::disable_by_id() WC 6.8.0

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