GeoIP version check in status report

This commit is contained in:
Mike Jolley 2018-03-29 16:44:45 +01:00
parent 7ec6917475
commit b88289e5c1
1 changed files with 3 additions and 1 deletions

View File

@ -426,7 +426,9 @@ $untested_plugins = $plugin_updates->get_untested_plugins( WC()->version, 'minor
<td class="help"><?php echo wc_help_tip( esc_html__( 'The GeoIP database from MaxMind is used to geolocate customers.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
<td>
<?php
if ( file_exists( $database['maxmind_geoip_database'] ) ) {
if ( version_compare( $environment['php_version'], '5.4', '<' ) ) {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . wp_kses_post( __( 'MaxMind GeoIP database requires at least PHP 5.4.', 'woocommerce' ) ) . '</mark>';
} elseif ( file_exists( $database['maxmind_geoip_database'] ) ) {
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span> <code class="private">' . esc_html( $database['maxmind_geoip_database'] ) . '</code></mark> ';
} else {
/* Translators: %1$s: Library url, %2$s: install path. */