WC_Download_Handler::check_server_config()private staticWC 1.0

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

{} Это метод класса: WC_Download_Handler{}

Хуков нет.

Возвращает

null. Ничего.

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

$result = WC_Download_Handler::check_server_config();

Код WC_Download_Handler::check_server_config() WC 6.9.4

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
}