diff --git a/includes/Settings/SettingsDebug.php b/includes/Settings/SettingsDebug.php index d66d10582..0f3b4902e 100644 --- a/includes/Settings/SettingsDebug.php +++ b/includes/Settings/SettingsDebug.php @@ -951,6 +951,11 @@ public function get_server_config(): array { $apc = extension_loaded( 'apc' ); $zop = extension_loaded( 'Zend OPcache' ); $op = extension_loaded( 'opcache' ); + $dom = extension_loaded( 'DOM' ); + $mbstring = extension_loaded( 'mbstring' ); + $gd = extension_loaded( 'gd' ); + $zlib = extension_loaded( 'zlib' ); + $fileinfo = extension_loaded( 'fileinfo' ); $server_configs = array( 'PHP version' => array( @@ -961,18 +966,18 @@ public function get_server_config(): array { 'DOMDocument extension' => array( 'required' => true, 'value' => phpversion( 'DOM' ), - 'result' => class_exists( 'DOMDocument' ), + 'result' => $dom, ), 'MBString extension' => array( 'required' => true, 'value' => phpversion( 'mbstring' ), - 'result' => function_exists( 'mb_send_mail' ), + 'result' => $mbstring, 'fallback' => __( 'Recommended, will use fallback functions', 'woocommerce-pdf-invoices-packing-slips' ), ), 'GD' => array( 'required' => true, 'value' => phpversion( 'gd' ), - 'result' => function_exists( 'imagecreate' ), + 'result' => $gd, 'fallback' => __( 'Required if you have images in your documents', 'woocommerce-pdf-invoices-packing-slips' ), ), 'WebP Support' => array( @@ -984,7 +989,7 @@ public function get_server_config(): array { 'Zlib' => array( 'required' => __( 'To compress PDF documents', 'woocommerce-pdf-invoices-packing-slips' ), 'value' => phpversion( 'zlib' ), - 'result' => function_exists( 'gzcompress' ), + 'result' => $zlib, 'fallback' => __( 'Recommended to compress PDF documents', 'woocommerce-pdf-invoices-packing-slips' ), ), 'opcache' => array( @@ -1007,7 +1012,12 @@ public function get_server_config(): array { ), 'WP Memory Limit' => array( /* translators: tags */ - 'required' => sprintf( __( 'Recommended: 128MB (more for plugin-heavy setups
See: %1$sIncreasing the WordPress Memory Limit%2$s', 'woocommerce-pdf-invoices-packing-slips' ), '
', '' ), + 'required' => __( 'Recommended: 128MB (especially for plugin-heavy setups)', 'woocommerce-pdf-invoices-packing-slips' ) . '
' . sprintf( + /* translators: 1: opening anchor tag, 2: closing anchor tag */ + __( 'See: %1$sIncreasing the WordPress Memory Limit%2$s', 'woocommerce-pdf-invoices-packing-slips' ), + '', + '' + ), 'value' => sprintf( 'WordPress: %s, PHP: %s', WP_MEMORY_LIMIT, $php_mem_limit ), 'result' => $memory_limit > 67108864, ), @@ -1020,7 +1030,7 @@ public function get_server_config(): array { 'fileinfo' => array ( 'required' => __( 'Necessary to verify the MIME type of local images.', 'woocommerce-pdf-invoices-packing-slips' ), 'value' => null, - 'result' => extension_loaded( 'fileinfo' ), + 'result' => $fileinfo, 'fallback' => __( 'fileinfo disabled', 'woocommerce-pdf-invoices-packing-slips' ), ), 'base64_decode' => array ( @@ -1089,7 +1099,7 @@ public function handle_server_requirement_notice(): void { $server_configs = $this->get_server_config(); foreach ( $server_configs as $config_name => $config ) { - if ( in_array( $config_name, array( 'opcache', 'GMagick or IMagick' ), true ) ) { + if ( in_array( $config_name, array( 'opcache', 'GMagick or IMagick', 'WP Memory Limit' ), true ) ) { continue; }