Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Register::enable_allpublicWC 1.0

Enables all Approved Download Directory rules in a single operation.

Method of the class: Register{}

No Hooks.

Returns

true|false.

Usage

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

Register::enable_all() code WC 10.8.1

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;
}