Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories
Register::enable_all()
Enables all Approved Download Directory rules in a single operation.
Метод класса: Register{}
Хуков нет.
Возвращает
true|false
.
Использование
$Register = new Register(); $Register->enable_all(): bool;
Код Register::enable_all() Register::enable all WC 9.3.1
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" ); }