Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Register::enable_all()publicWC 1.0

Enables all Approved Download Directory rules in a single operation.

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

Хуков нет.

Возвращает

true|false.

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

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

Код Register::enable_all() WC 6.8.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" );
}