Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Register::disable_allpublicWC 1.0

Disables all Approved Download Directory rules in a single operation.

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

Хуков нет.

Возвращает

true|false.

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

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

Код Register::disable_all() WC 10.5.2

public function disable_all(): bool {
	global $wpdb;

	// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
	if ( ! $wpdb->query( "UPDATE {$this->get_table()} SET enabled = 0" ) ) {
		return false;
	}

	unset( $this->cache );
	return true;
}