WordPress at Your Fingertips
function is not described

WC_Download_Handler::check_server_config() private WC 1.0

Check and set certain server config variables to ensure downloads work as intended.

{} It's a method of the class: WC_Download_Handler{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Download_Handler::check_server_config();

Code of WC_Download_Handler::check_server_config() WC 5.7.1

private static function check_server_config() {
	wc_set_time_limit( 0 );
	if ( function_exists( 'apache_setenv' ) ) {
		@apache_setenv( 'no-gzip', 1 ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged, WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_apache_setenv
	}
	@ini_set( 'zlib.output_compression', 'Off' ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged, WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_ini_set
	@session_write_close(); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged, WordPress.VIP.SessionFunctionsUsage.session_session_write_close
}