WordPress at Your Fingertips
function is not described

wc_ms_protect_download_rewite_rules() WC 1.0

Protect downloads from ms-files.php in multisite.

No Hooks.

Return

String.

Usage

wc_ms_protect_download_rewite_rules( $rewrite );
$rewrite(string) (required)
rewrite rules.

Code of wc_ms_protect_download_rewite_rules() WC 5.7.0

function wc_ms_protect_download_rewite_rules( $rewrite ) {
	if ( ! is_multisite() || 'redirect' === get_option( 'woocommerce_file_download_method' ) ) {
		return $rewrite;
	}

	$rule  = "\n# WooCommerce Rules - Protect Files from ms-files.php\n\n";
	$rule .= "<IfModule mod_rewrite.c>\n";
	$rule .= "RewriteEngine On\n";
	$rule .= "RewriteCond %{QUERY_STRING} file=woocommerce_uploads/ [NC]\n";
	$rule .= "RewriteRule /ms-files.php$ - [F]\n";
	$rule .= "</IfModule>\n\n";

	return $rule . $rewrite;
}