Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Register::enable_allpublicWC 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 11.0.0

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

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

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