Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Register::enable_all()publicWC 1.0

Enables all Approved Download Directory rules in a single operation.

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

No Hooks.

Return

true|false.

Usage

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

Code of Register::enable_all() WC 7.1.0

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