Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Register::disable_all()publicWC 1.0

Disables all Approved Download Directory rules in a single operation.

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

No Hooks.

Return

true|false.

Usage

$Register = new Register();
$Register->disable_all(): bool;

Code of Register::disable_all() WC 7.1.0

public function disable_all(): bool {
	global $wpdb;
	$table = $this->get_table();
	// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
	return (bool) $wpdb->query( "UPDATE {$table} SET enabled = 0" );
}