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