WC_Download_Handler::check_server_config()
Check and set certain server config variables to ensure downloads work as intended.
Method of the class: WC_Download_Handler{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = WC_Download_Handler::check_server_config();
WC_Download_Handler::check_server_config() WC Download Handler::check server config code WC 9.4.2
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 }