2014-07-28 14:50:11 +00:00
< ? php
/**
2015-12-08 16:38:36 +00:00
* Admin View : Page - Status Report .
2014-07-28 14:50:11 +00:00
*/
2014-07-28 15:16:35 +00:00
if ( ! defined ( 'ABSPATH' ) ) {
2015-03-07 03:16:08 +00:00
exit ;
2014-07-28 15:16:35 +00:00
}
2014-07-28 14:50:11 +00:00
2016-08-03 17:44:20 +00:00
global $wpdb ;
2017-04-19 10:08:34 +00:00
if ( ! class_exists ( 'WC_REST_System_Status_Controller' , false ) ) {
wp_die ( 'Cannot load the REST API to access WC_REST_System_Status_Controller.' );
}
2017-08-06 05:15:10 +00:00
$system_status = new WC_REST_System_Status_Controller ;
$environment = $system_status -> get_environment_info ();
$database = $system_status -> get_database_info ();
$post_type_counts = $system_status -> get_post_type_counts ();
$active_plugins = $system_status -> get_active_plugins ();
$theme = $system_status -> get_theme_info ();
$security = $system_status -> get_security_info ();
$settings = $system_status -> get_settings ();
$pages = $system_status -> get_pages ();
2017-08-29 16:15:16 +00:00
$plugin_updates = new WC_Plugin_Updates ;
$untested_plugins = $plugin_updates -> get_untested_plugins ( WC () -> version , 'minor' );
2014-07-28 14:50:11 +00:00
?>
2016-02-23 08:33:11 +00:00
< div class = " updated woocommerce-message inline " >
2014-07-18 20:55:14 +00:00
< p >< ? php _e ( 'Please copy and paste this information in your ticket when contacting support:' , 'woocommerce' ); ?> </p>
2016-10-12 10:16:30 +00:00
< p class = " submit " >< a href = " # " class = " button-primary debug-report " >< ? php _e ( 'Get system report' , 'woocommerce' ); ?> </a>
< a class = " button-secondary docs " href = " https://docs.woocommerce.com/document/understanding-the-woocommerce-system-status-report/ " target = " _blank " >< ? php _e ( 'Understanding the status report' , 'woocommerce' ); ?> </a></p>
2014-07-29 15:06:58 +00:00
< div id = " debug-report " >
< textarea readonly = " readonly " ></ textarea >
2016-10-12 10:16:30 +00:00
< p class = " submit " >< button id = " copy-for-support " class = " button-primary " href = " # " data - tip = " <?php esc_attr_e( 'Copied!', 'woocommerce' ); ?> " >< ? php _e ( 'Copy for support' , 'woocommerce' ); ?> </button></p>
2016-03-08 19:19:41 +00:00
< p class = " copy-error hidden " >< ? php _e ( 'Copying to clipboard failed. Please press Ctrl/Cmd+C to copy.' , 'woocommerce' ); ?> </p>
2014-07-29 15:06:58 +00:00
</ div >
2013-07-18 14:22:05 +00:00
</ div >
2014-08-26 17:13:39 +00:00
< table class = " wc_status_table widefat " cellspacing = " 0 " id = " status " >
2013-07-18 14:22:05 +00:00
< thead >
< tr >
2016-10-12 10:16:30 +00:00
< th colspan = " 3 " data - export - label = " WordPress Environment " >< h2 >< ? php _e ( 'WordPress environment' , 'woocommerce' ); ?> </h2></th>
2013-07-18 14:22:05 +00:00
</ tr >
</ thead >
< tbody >
< tr >
2015-01-03 17:45:02 +00:00
< td data - export - label = " Home URL " >< ? php _e ( 'Home URL' , 'woocommerce' ); ?> :</td>
2017-04-26 12:51:53 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The homepage URL of your site.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $environment [ 'home_url' ] ) ?> </td>
2013-07-18 14:22:05 +00:00
</ tr >
< tr >
2015-01-03 17:45:02 +00:00
< td data - export - label = " Site URL " >< ? php _e ( 'Site URL' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The root URL of your site.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $environment [ 'site_url' ] ) ?> </td>
2013-07-18 14:22:05 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " WC Version " >< ? php _e ( 'WC version' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The version of WooCommerce installed on your site.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $environment [ 'version' ] ) ?> </td>
2013-07-18 14:22:05 +00:00
</ tr >
2014-10-18 09:56:58 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Log Directory Writable " >< ? php _e ( 'Log directory writable' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Several WooCommerce extensions can write logs which makes debugging problems easier. The directory must be writable for this to happen.' , 'woocommerce' ) ); ?> </td>
2014-10-18 09:56:58 +00:00
< td >< ? php
2016-08-03 17:44:20 +00:00
if ( $environment [ 'log_directory_writable' ] ) {
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span> <code class="private">' . esc_html ( $environment [ 'log_directory' ] ) . '</code></mark> ' ;
2014-10-18 09:56:58 +00:00
} else {
2016-10-24 23:56:38 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( 'To allow logging, make %1$s writable or define a custom %2$s.' , 'woocommerce' ), '<code>' . $environment [ 'log_directory' ] . '</code>' , '<code>WC_LOG_DIR</code>' ) . '</mark>' ;
2014-10-18 09:56:58 +00:00
}
?> </td>
</ tr >
2013-07-18 14:22:05 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " WP Version " >< ? php _e ( 'WP version' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The version of WordPress installed on your site.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $environment [ 'wp_version' ] ) ?> </td>
2013-07-18 14:25:17 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " WP Multisite " >< ? php _e ( 'WP multisite' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Whether or not you have WordPress Multisite enabled.' , 'woocommerce' ) ); ?> </td>
2016-09-02 03:40:52 +00:00
< td >< ? php echo ( $environment [ 'wp_multisite' ] ) ? '<span class="dashicons dashicons-yes"></span>' : '–' ; ?> </td>
2013-07-18 14:22:05 +00:00
</ tr >
2014-08-26 16:54:25 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " WP Memory Limit " >< ? php _e ( 'WP memory limit' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The maximum amount of memory (RAM) that your site can use at one time.' , 'woocommerce' ) ); ?> </td>
2013-07-18 14:22:05 +00:00
< td >< ? php
2016-08-03 17:44:20 +00:00
if ( $environment [ 'wp_memory_limit' ] < 67108864 ) {
2016-09-01 20:50:14 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( '%1$s - We recommend setting memory to at least 64MB. See: %2$s' , 'woocommerce' ), size_format ( $environment [ 'wp_memory_limit' ] ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">' . __ ( 'Increasing memory allocated to PHP' , 'woocommerce' ) . '</a>' ) . '</mark>' ;
2013-07-18 14:22:05 +00:00
} else {
2016-08-03 17:44:20 +00:00
echo '<mark class="yes">' . size_format ( $environment [ 'wp_memory_limit' ] ) . '</mark>' ;
2013-07-18 14:22:05 +00:00
}
?> </td>
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " WP Debug Mode " >< ? php _e ( 'WP debug mode' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Displays whether or not WordPress is in Debug Mode.' , 'woocommerce' ) ); ?> </td>
2016-01-21 21:38:15 +00:00
< td >
2016-08-03 17:44:20 +00:00
< ? php if ( $environment [ 'wp_debug_mode' ] ) : ?>
2016-03-08 10:21:06 +00:00
< mark class = " yes " >< span class = " dashicons dashicons-yes " ></ span ></ mark >
2016-01-21 21:38:15 +00:00
< ? php else : ?>
< mark class = " no " >& ndash ; </ mark >
< ? php endif ; ?>
</ td >
2013-07-18 14:22:05 +00:00
</ tr >
2016-01-14 07:01:22 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " WP Cron " >< ? php _e ( 'WP cron' , 'woocommerce' ); ?> :</td>
2016-01-14 07:01:22 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Displays whether or not WP Cron Jobs are enabled.' , 'woocommerce' ) ); ?> </td>
2016-01-21 21:38:15 +00:00
< td >
2016-08-03 17:44:20 +00:00
< ? php if ( $environment [ 'wp_cron' ] ) : ?>
2016-03-08 10:21:06 +00:00
< mark class = " yes " >< span class = " dashicons dashicons-yes " ></ span ></ mark >
2016-08-03 17:44:20 +00:00
< ? php else : ?>
< mark class = " no " >& ndash ; </ mark >
2016-01-21 21:38:15 +00:00
< ? php endif ; ?>
</ td >
2016-01-14 07:01:22 +00:00
</ tr >
2013-08-07 21:05:09 +00:00
< tr >
2015-01-03 17:45:02 +00:00
< td data - export - label = " Language " >< ? php _e ( 'Language' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The current language used by WordPress. Default = English' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $environment [ 'language' ] ) ?> </td>
2014-10-18 09:56:58 +00:00
</ tr >
</ tbody >
2014-10-24 11:49:27 +00:00
</ table >
2015-04-27 20:00:55 +00:00
< table class = " wc_status_table widefat " cellspacing = " 0 " >
2014-10-18 09:56:58 +00:00
< thead >
< tr >
2016-10-12 10:16:30 +00:00
< th colspan = " 3 " data - export - label = " Server Environment " >< h2 >< ? php _e ( 'Server environment' , 'woocommerce' ); ?> </h2></th>
2013-08-07 21:05:09 +00:00
</ tr >
2014-10-18 09:56:58 +00:00
</ thead >
< tbody >
2013-07-18 14:22:05 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Server Info " >< ? php _e ( 'Server info' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Information about the web server that is currently hosting your site.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $environment [ 'server_info' ] ); ?> </td>
2014-10-18 09:56:58 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " PHP Version " >< ? php _e ( 'PHP version' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The version of PHP installed on your hosting server.' , 'woocommerce' ) ); ?> </td>
2015-03-09 12:18:54 +00:00
< td >< ? php
2016-08-03 17:44:20 +00:00
if ( version_compare ( $environment [ 'php_version' ], '5.6' , '<' ) ) {
2016-09-01 20:50:14 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( '%1$s - We recommend a minimum PHP version of 5.6. See: %2$s' , 'woocommerce' ), esc_html ( $environment [ 'php_version' ] ), '<a href="https://docs.woocommerce.com/document/how-to-update-your-php-version/" target="_blank">' . __ ( 'How to update your PHP version' , 'woocommerce' ) . '</a>' ) . '</mark>' ;
2015-03-09 12:18:54 +00:00
} else {
2016-08-03 17:44:20 +00:00
echo '<mark class="yes">' . esc_html ( $environment [ 'php_version' ] ) . '</mark>' ;
2015-03-09 12:18:54 +00:00
}
?> </td>
2013-07-18 14:22:05 +00:00
</ tr >
< ? php if ( function_exists ( 'ini_get' ) ) : ?>
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " PHP Post Max Size " >< ? php _e ( 'PHP post max size' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The largest filesize that can be contained in one post.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( size_format ( $environment [ 'php_post_max_size' ] ) ) ?> </td>
2013-07-18 14:22:05 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " PHP Time Limit " >< ? php _e ( 'PHP time limit' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $environment [ 'php_max_execution_time' ] ) ?> </td>
2013-07-18 14:22:05 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " PHP Max Input Vars " >< ? php _e ( 'PHP max input vars' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The maximum number of variables your server can use for a single function to avoid overloads.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $environment [ 'php_max_input_vars' ] ) ?> </td>
2013-07-18 14:22:05 +00:00
</ tr >
2016-03-29 13:27:37 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " cURL Version " >< ? php _e ( 'cURL version' , 'woocommerce' ); ?> :</td>
2016-06-05 19:07:46 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The version of cURL installed on your server.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $environment [ 'curl_version' ] ) ?> </td>
2016-03-29 13:27:37 +00:00
</ tr >
2013-07-18 14:22:05 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " SUHOSIN Installed " >< ? php _e ( 'SUHOSIN installed' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo $environment [ 'suhosin_installed' ] ? '<span class="dashicons dashicons-yes"></span>' : '–' ; ?> </td>
2013-07-18 14:22:05 +00:00
</ tr >
2016-07-25 17:43:27 +00:00
< ? php endif ;
if ( $wpdb -> use_mysqli ) {
$ver = mysqli_get_server_info ( $wpdb -> dbh );
} else {
2017-11-09 18:36:29 +00:00
$ver = mysql_get_server_info (); // @codingStandardsIgnoreLine
2016-07-25 17:43:27 +00:00
}
if ( ! empty ( $wpdb -> is_mysql ) && ! stristr ( $ver , 'MariaDB' ) ) : ?>
2016-04-27 11:03:49 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " MySQL Version " >< ? php _e ( 'MySQL version' , 'woocommerce' ); ?> :</td>
2016-04-27 11:03:49 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The version of MySQL installed on your hosting server.' , 'woocommerce' ) ); ?> </td>
< td >
< ? php
2016-08-03 17:44:20 +00:00
if ( version_compare ( $environment [ 'mysql_version' ], '5.6' , '<' ) ) {
2016-10-12 10:16:30 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( '%1$s - We recommend a minimum MySQL version of 5.6. See: %2$s' , 'woocommerce' ), esc_html ( $environment [ 'mysql_version' ] ), '<a href="https://wordpress.org/about/requirements/" target="_blank">' . __ ( 'WordPress requirements' , 'woocommerce' ) . '</a>' ) . '</mark>' ;
2016-04-27 11:03:49 +00:00
} else {
2016-08-03 17:44:20 +00:00
echo '<mark class="yes">' . esc_html ( $environment [ 'mysql_version' ] ) . '</mark>' ;
2016-04-27 11:03:49 +00:00
}
?>
</ td >
</ tr >
< ? php endif ; ?>
2014-10-18 09:56:58 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Max Upload Size " >< ? php _e ( 'Max upload size' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The largest filesize that can be uploaded to your WordPress installation.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo size_format ( $environment [ 'max_upload_size' ] ) ?> </td>
2013-09-09 11:20:22 +00:00
</ tr >
2013-08-14 18:21:49 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Default Timezone is UTC " >< ? php _e ( 'Default timezone is UTC' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The default timezone for your server.' , 'woocommerce' ) ); ?> </td>
2015-03-07 03:18:14 +00:00
< td >< ? php
2016-08-03 17:44:20 +00:00
if ( 'UTC' !== $environment [ 'default_timezone' ] ) {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( 'Default timezone is %s - it should be UTC' , 'woocommerce' ), $environment [ 'default_timezone' ] ) . '</mark>' ;
2013-08-14 18:21:49 +00:00
} else {
2016-03-08 10:21:06 +00:00
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' ;
2013-08-14 18:21:49 +00:00
} ?>
</ td >
</ tr >
2016-08-03 17:44:20 +00:00
< tr >
< td data - export - label = " fsockopen/cURL " >< ? php _e ( 'fsockopen/cURL' , 'woocommerce' ); ?> :</td>
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services.' , 'woocommerce' ) ); ?> </td>
< td >< ? php
if ( $environment [ 'fsockopen_or_curl_enabled' ] ) {
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' ;
2015-02-26 07:05:01 +00:00
} else {
2016-08-03 17:44:20 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . __ ( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.' , 'woocommerce' ) . '</mark>' ;
} ?>
</ td >
</ tr >
< tr >
< td data - export - label = " SoapClient " >< ? php _e ( 'SoapClient' , 'woocommerce' ); ?> :</td>
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Some webservices like shipping use SOAP to get information from remote servers, for example, live shipping quotes from FedEx require SOAP to be installed.' , 'woocommerce' ) ); ?> </td>
< td >< ? php
if ( $environment [ 'soapclient_enabled' ] ) {
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' ;
2015-02-26 07:05:01 +00:00
} else {
2016-08-03 17:44:20 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( 'Your server does not have the %s class enabled - some gateway plugins which use SOAP may not work as expected.' , 'woocommerce' ), '<a href="https://php.net/manual/en/class.soapclient.php">SoapClient</a>' ) . '</mark>' ;
} ?>
</ td >
</ tr >
< tr >
< td data - export - label = " DOMDocument " >< ? php _e ( 'DOMDocument' , 'woocommerce' ); ?> :</td>
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.' , 'woocommerce' ) ); ?> </td>
< td >< ? php
if ( $environment [ 'domdocument_enabled' ] ) {
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' ;
} else {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( 'Your server does not have the %s class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument.' , 'woocommerce' ), '<a href="https://php.net/manual/en/class.domdocument.php">DOMDocument</a>' ) . '</mark>' ;
} ?>
</ td >
</ tr >
< tr >
< td data - export - label = " GZip " >< ? php _e ( 'GZip' , 'woocommerce' ); ?> :</td>
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'GZip (gzopen) is used to open the GEOIP database from MaxMind.' , 'woocommerce' ) ); ?> </td>
< td >< ? php
if ( $environment [ 'gzip_enabled' ] ) {
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' ;
} else {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( 'Your server does not support the %s function - this is required to use the GeoIP database from MaxMind.' , 'woocommerce' ), '<a href="https://php.net/manual/en/zlib.installation.php">gzopen</a>' ) . '</mark>' ;
} ?>
</ td >
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Multibyte String " >< ? php _e ( 'Multibyte string' , 'woocommerce' ); ?> :</td>
2016-08-03 17:44:20 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.' , 'woocommerce' ) ); ?> </td>
< td >< ? php
if ( $environment [ 'mbstring_enabled' ] ) {
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' ;
} else {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( 'Your server does not support the %s functions - this is required for better character encoding. Some fallbacks will be used instead for it.' , 'woocommerce' ), '<a href="https://php.net/manual/en/mbstring.installation.php">mbstring</a>' ) . '</mark>' ;
} ?>
</ td >
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Remote Post " >< ? php _e ( 'Remote post' , 'woocommerce' ); ?> :</td>
2016-08-03 17:44:20 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'PayPal uses this method of communicating when sending back transaction information.' , 'woocommerce' ) ); ?> </td>
< td >< ? php
if ( $environment [ 'remote_post_successful' ] ) {
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' ;
} else {
2017-08-15 21:32:36 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( '%s failed. Contact your hosting provider.' , 'woocommerce' ), 'wp_remote_post()' ) . ' ' . esc_html ( $environment [ 'remote_post_response' ] ) . '</mark>' ;
2016-08-03 17:44:20 +00:00
} ?>
</ td >
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Remote Get " >< ? php _e ( 'Remote get' , 'woocommerce' ); ?> :</td>
2016-08-03 17:44:20 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'WooCommerce plugins may use this method of communication when checking for plugin updates.' , 'woocommerce' ) ); ?> </td>
< td >< ? php
if ( $environment [ 'remote_get_successful' ] ) {
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' ;
} else {
2017-08-15 21:32:36 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( '%s failed. Contact your hosting provider.' , 'woocommerce' ), 'wp_remote_get()' ) . ' ' . esc_html ( $environment [ 'remote_get_response' ] ) . '</mark>' ;
2016-08-03 17:44:20 +00:00
} ?>
</ td >
</ tr >
2017-04-05 16:13:20 +00:00
< ? php
$rows = apply_filters ( 'woocommerce_system_status_environment_rows' , array () );
foreach ( $rows as $row ) {
if ( ! empty ( $row [ 'success' ] ) ) {
$css_class = 'yes' ;
$icon = '<span class="dashicons dashicons-yes"></span>' ;
} else {
$css_class = 'error' ;
$icon = '<span class="dashicons dashicons-no-alt"></span>' ;
}
?>
< tr >
2017-04-06 22:30:21 +00:00
< td data - export - label = " <?php echo esc_attr( $row['name'] ); ?> " >< ? php echo esc_html ( $row [ 'name' ] ); ?> :</td>
2017-04-05 16:13:20 +00:00
< td class = " help " >< ? php echo isset ( $row [ 'help' ] ) ? $row [ 'help' ] : '' ; ?> </td>
< td >
2017-04-06 22:30:21 +00:00
< mark class = " <?php echo esc_attr( $css_class ); ?> " >
< ? php echo $icon ; ?> <?php echo ! empty( $row['note'] ) ? wp_kses_data( $row['note'] ) : ''; ?>
</ mark >
2017-04-05 16:13:20 +00:00
</ td >
</ tr >< ? php
} ?>
2013-07-18 14:22:05 +00:00
</ tbody >
2014-10-24 11:49:27 +00:00
</ table >
2015-05-15 14:19:39 +00:00
< table class = " wc_status_table widefat " cellspacing = " 0 " >
2017-08-06 05:15:10 +00:00
< thead >
< tr >
< th colspan = " 3 " data - export - label = " Database " >< h2 >< ? php _e ( 'Database' , 'woocommerce' ); ?> </h2></th>
</ tr >
</ thead >
< tbody >
< tr >
< td data - export - label = " WC Database Version " >< ? php _e ( 'WC database version' , 'woocommerce' ); ?> :</td>
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The version of WooCommerce that the database is formatted for. This should be the same as your WooCommerce version.' , 'woocommerce' ) ); ?> </td>
< td >< ? php echo esc_html ( $database [ 'wc_database_version' ] ); ?> </td>
</ tr >
< tr >
< td data - export - label = " WC Database Prefix " >< ? php _e ( 'Database prefix' , 'woocommerce' ); ?> </td>
< td class = " help " >& nbsp ; </ td >
< td >< ? php
if ( strlen ( $database [ 'database_prefix' ] ) > 20 ) {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( '%1$s - We recommend using a prefix with less than 20 characters. See: %2$s' , 'woocommerce' ), esc_html ( $database [ 'database_prefix' ] ), '<a href="https://docs.woocommerce.com/document/completed-order-email-doesnt-contain-download-links/#section-2" target="_blank">' . __ ( 'How to update your database table prefix' , 'woocommerce' ) . '</a>' ) . '</mark>' ;
} else {
echo '<mark class="yes">' . esc_html ( $database [ 'database_prefix' ] ) . '</mark>' ;
}
2016-08-03 17:44:20 +00:00
?>
2017-08-06 05:15:10 +00:00
</ td >
</ tr >
2016-03-30 12:11:26 +00:00
2017-08-16 00:52:14 +00:00
< ? php if ( $settings [ 'geolocation_enabled' ] ) { ?>
2017-08-06 05:15:10 +00:00
< tr >
< td data - export - label = " MaxMind GeoIP Database " >< ? php _e ( 'MaxMind GeoIP database' , 'woocommerce' ); ?> :</td>
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The GeoIP database from MaxMind is used to geolocate customers.' , 'woocommerce' ) ); ?> </td>
< td >< ? php
2017-08-16 00:52:14 +00:00
if ( 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 {
printf ( '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( 'The MaxMind GeoIP Database does not exist - Geolocation will not function. You can download and install it manually from %1$s to the path: %2$s. Scroll down to "Downloads" and download the "Binary / gzip" file next to "GeoLite Country". Please remember to uncompress GeoIP.dat.gz and upload the GeoIP.dat file only.' , 'woocommerce' ), make_clickable ( 'http://dev.maxmind.com/geoip/legacy/geolite/' ), '<code class="private">' . $database [ 'maxmind_geoip_database' ] . '</code>' ) . '</mark>' , WC_LOG_DIR );
}
?> </td>
2017-08-06 05:15:10 +00:00
</ tr >
2017-08-16 00:52:14 +00:00
< ? php } ?>
2017-08-06 05:15:10 +00:00
< tr >
2017-08-16 00:52:14 +00:00
< td >< ? php _e ( 'Total Database Size' , 'woocommerce' ); ?> </td>
< td class = " help " >& nbsp ; </ td >
2017-09-02 23:56:29 +00:00
< td >< ? php printf ( '%.2fMB' , $database [ 'database_size' ][ 'data' ] + $database [ 'database_size' ][ 'index' ] ); ?> </td>
2017-08-06 05:15:10 +00:00
</ tr >
2017-08-16 00:52:14 +00:00
< tr >
< td >< ? php _e ( 'Database Data Size' , 'woocommerce' ); ?> </td>
< td class = " help " >& nbsp ; </ td >
2017-09-02 23:56:29 +00:00
< td >< ? php printf ( '%.2fMB' , $database [ 'database_size' ][ 'data' ] ); ?> </td>
2017-08-16 00:52:14 +00:00
</ tr >
< tr >
< td >< ? php _e ( 'Database Index Size' , 'woocommerce' ); ?> </td>
< td class = " help " >& nbsp ; </ td >
2017-09-02 23:56:29 +00:00
< td >< ? php printf ( '%.2fMB' , $database [ 'database_size' ][ 'index' ] ); ?> </td>
2017-08-16 00:52:14 +00:00
</ tr >
< ? php foreach ( $database [ 'database_tables' ][ 'woocommerce' ] as $table => $table_data ) { ?>
< tr >
< td >< ? php echo esc_html ( $table ); ?> </td>
< td class = " help " >& nbsp ; </ td >
< td >
< ? php if ( ! $table_data ) {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . __ ( 'Table does not exist' , 'woocommerce' ) . '</mark>' ;
} else {
printf ( __ ( 'Data: %.2fMB + Index: %.2fMB' , 'woocommerce' ), wc_format_decimal ( $table_data [ 'data' ], 2 ), wc_format_decimal ( $table_data [ 'index' ], 2 ) );
} ?>
</ td >
</ tr >
< ? php } ?>
< ? php foreach ( $database [ 'database_tables' ][ 'other' ] as $table => $table_data ) { ?>
2017-08-06 05:15:10 +00:00
< tr >
2017-08-16 00:52:14 +00:00
< td >< ? php echo esc_html ( $table ); ?> </td>
2017-08-06 05:15:10 +00:00
< td class = " help " >& nbsp ; </ td >
< td >
2017-08-16 00:52:14 +00:00
< ? php printf ( __ ( 'Data: %.2fMB + Index: %.2fMB' , 'woocommerce' ), wc_format_decimal ( $table_data [ 'data' ], 2 ), wc_format_decimal ( $table_data [ 'index' ], 2 ) ); ?>
2017-08-06 05:15:10 +00:00
</ td >
</ tr >
2017-08-16 00:52:14 +00:00
< ? php } ?>
2017-08-06 05:15:10 +00:00
</ tbody >
</ table >
< table class = " wc_status_table widefat " cellspacing = " 0 " >
< thead >
< tr >
< th colspan = " 3 " data - export - label = " Post Type Counts " >< h2 >< ? php _e ( 'Post Type Counts' , 'woocommerce' ); ?> </h2></th>
</ tr >
</ thead >
< tbody >
< ? php
foreach ( $post_type_counts as $post_type ) {
2016-08-03 17:44:20 +00:00
?>
2017-08-06 05:15:10 +00:00
< tr >
< td >< ? php echo esc_html ( $post_type -> type ); ?> </td>
< td class = " help " >& nbsp ; </ td >
< td >< ? php echo absint ( $post_type -> count ); ?> </td>
</ tr >
< ? php
}
?>
</ tbody >
2015-05-15 14:19:39 +00:00
</ table >
2016-11-08 23:00:46 +00:00
< table class = " wc_status_table widefat " cellspacing = " 0 " >
< thead >
< tr >
< th colspan = " 3 " data - export - label = " Security " >< h2 >< ? php _e ( 'Security' , 'woocommerce' ); ?> </h2></th>
</ tr >
</ thead >
< tbody >
< tr >
2016-11-09 13:54:28 +00:00
< td data - export - label = " Secure connection (HTTPS) " >< ? php _e ( 'Secure connection (HTTPS)' , 'woocommerce' ); ?> :</td>
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Is the connection to your store secure?' , 'woocommerce' ) ); ?> </td>
2016-11-08 23:00:46 +00:00
< td >
2016-11-10 00:19:47 +00:00
< ? php if ( $security [ 'secure_connection' ] ) : ?>
2016-11-08 23:00:46 +00:00
< mark class = " yes " >< span class = " dashicons dashicons-yes " ></ span ></ mark >
2016-11-10 00:19:47 +00:00
< ? php else : ?>
< mark class = " error " >< span class = " dashicons dashicons-warning " ></ span >< ? php printf ( __ ( 'Your store is not using HTTPS. <a href="%s" target="_blank">Learn more about HTTPS and SSL Certificates</a>.' , 'woocommerce' ), 'https://docs.woocommerce.com/document/ssl-and-https/' ); ?> </mark>
2016-11-08 23:00:46 +00:00
< ? php endif ; ?>
</ td >
</ tr >
< tr >
2016-11-09 13:54:28 +00:00
< td data - export - label = " Hide errors from visitors " >< ? php _e ( 'Hide errors from visitors' , 'woocommerce' ); ?> </td>
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Error messages can contain sensitive information about your store environment. These should be hidden from untrusted visitors.' , 'woocommerce' ) ); ?> </td>
2016-11-08 23:00:46 +00:00
< td >
2016-11-10 00:19:47 +00:00
< ? php if ( $security [ 'hide_errors' ] ) : ?>
2016-11-08 23:00:46 +00:00
< mark class = " yes " >< span class = " dashicons dashicons-yes " ></ span ></ mark >
2016-11-10 00:19:47 +00:00
< ? php else : ?>
< mark class = " error " >< span class = " dashicons dashicons-warning " ></ span >< ? php _e ( 'Error messages should not be shown to visitors.' , 'woocommerce' ); ?> </mark>
2016-11-08 23:00:46 +00:00
< ? php endif ; ?>
</ td >
</ tr >
</ tbody >
</ table >
2015-04-27 20:00:55 +00:00
< table class = " wc_status_table widefat " cellspacing = " 0 " >
2013-07-18 14:22:05 +00:00
< thead >
< tr >
2016-10-12 10:16:30 +00:00
< th colspan = " 3 " data - export - label = " Active Plugins (<?php echo count( $active_plugins ) ?>) " >< h2 >< ? php _e ( 'Active plugins' , 'woocommerce' ); ?> (<?php echo count( $active_plugins ) ?>)</h2></th>
2013-07-18 14:22:05 +00:00
</ tr >
</ thead >
< tbody >
2014-10-24 11:49:27 +00:00
< ? php
foreach ( $active_plugins as $plugin ) {
2016-08-03 17:44:20 +00:00
if ( ! empty ( $plugin [ 'name' ] ) ) {
$dirname = dirname ( $plugin [ 'plugin' ] );
2013-07-18 14:22:05 +00:00
2015-12-08 16:38:36 +00:00
// Link the plugin name to the plugin url if available.
2016-08-03 17:44:20 +00:00
$plugin_name = esc_html ( $plugin [ 'name' ] );
if ( ! empty ( $plugin [ 'url' ] ) ) {
2016-11-04 15:41:51 +00:00
$plugin_name = '<a href="' . esc_url ( $plugin [ 'url' ] ) . '" aria-label="' . esc_attr__ ( 'Visit plugin homepage' , 'woocommerce' ) . '" target="_blank">' . $plugin_name . '</a>' ;
2014-10-24 11:49:27 +00:00
}
2013-07-31 02:31:19 +00:00
2016-08-03 17:44:20 +00:00
$version_string = '' ;
$network_string = '' ;
2016-09-28 10:19:58 +00:00
if ( strstr ( $plugin [ 'url' ], 'woothemes.com' ) || strstr ( $plugin [ 'url' ], 'woocommerce.com' ) ) {
2016-08-03 17:44:20 +00:00
if ( ! empty ( $plugin [ 'version_latest' ] ) && version_compare ( $plugin [ 'version_latest' ], $plugin [ 'version' ], '>' ) ) {
2016-10-24 07:31:07 +00:00
/* translators: %s: plugin latest version */
$version_string = ' – <strong style="color:red;">' . sprintf ( esc_html__ ( '%s is available' , 'woocommerce' ), $plugin [ 'version_latest' ] ) . '</strong>' ;
2014-10-24 11:49:27 +00:00
}
2013-07-18 14:22:05 +00:00
2016-09-09 00:14:28 +00:00
if ( false != $plugin [ 'network_activated' ] ) {
2014-10-24 11:54:51 +00:00
$network_string = ' – <strong style="color:black;">' . __ ( 'Network enabled' , 'woocommerce' ) . '</strong>' ;
2013-07-18 14:22:05 +00:00
}
2017-08-30 09:25:01 +00:00
}
$untested_string = '' ;
if ( array_key_exists ( $plugin [ 'plugin' ], $untested_plugins ) ) {
$untested_string = ' – <strong style="color:red;">' . esc_html__ ( 'Not tested with the active version of WooCommerce' , 'woocommerce' ) . '</strong>' ;
2013-07-18 14:22:05 +00:00
}
2014-10-24 11:49:27 +00:00
?>
< tr >
< td >< ? php echo $plugin_name ; ?> </td>
< td class = " help " >& nbsp ; </ td >
2016-10-29 10:16:03 +00:00
< td >< ? php
/* translators: %s: plugin author */
2016-10-29 17:51:23 +00:00
printf ( __ ( 'by %s' , 'woocommerce' ), $plugin [ 'author_name' ] );
2017-08-29 16:15:16 +00:00
echo ' – ' . esc_html ( $plugin [ 'version' ] ) . $version_string . $untested_string . $network_string ;
2016-10-29 10:16:03 +00:00
?> </td>
2014-10-24 11:49:27 +00:00
</ tr >
< ? php
}
}
?>
2013-07-18 14:22:05 +00:00
</ tbody >
2014-10-24 11:49:27 +00:00
</ table >
2015-04-27 20:00:55 +00:00
< table class = " wc_status_table widefat " cellspacing = " 0 " >
2013-07-18 14:22:05 +00:00
< thead >
< tr >
2016-02-17 18:23:50 +00:00
< th colspan = " 3 " data - export - label = " Settings " >< h2 >< ? php _e ( 'Settings' , 'woocommerce' ); ?> </h2></th>
2013-07-18 14:22:05 +00:00
</ tr >
</ thead >
< tbody >
2016-08-03 17:44:20 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " API Enabled " >< ? php _e ( 'API enabled' , 'woocommerce' ); ?> :</td>
2016-08-03 17:44:20 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Does your site have REST API enabled?' , 'woocommerce' ) ); ?> </td>
< td >< ? php echo $settings [ 'api_enabled' ] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">–</mark>' ; ?> </td>
</ tr >
2013-07-18 14:22:05 +00:00
< tr >
2015-01-03 17:45:02 +00:00
< td data - export - label = " Force SSL " >< ? php _e ( 'Force SSL' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Does your site force a SSL Certificate for transactions?' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo $settings [ 'force_ssl' ] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">–</mark>' ; ?> </td>
2014-10-18 09:56:58 +00:00
</ tr >
< tr >
2015-01-03 17:45:02 +00:00
< td data - export - label = " Currency " >< ? php _e ( 'Currency' , 'woocommerce' ) ?> </td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'What currency prices are listed at in the catalog and which currency gateways will take payments in.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $settings [ 'currency' ] ) ?> (<?php echo esc_html( $settings['currency_symbol'] ) ?>)</td>
2014-10-18 09:56:58 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Currency Position " >< ? php _e ( 'Currency position' , 'woocommerce' ) ?> </td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The position of the currency symbol.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $settings [ 'currency_position' ] ) ?> </td>
2014-10-18 09:56:58 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Thousand Separator " >< ? php _e ( 'Thousand separator' , 'woocommerce' ) ?> </td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The thousand separator of displayed prices.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $settings [ 'thousand_separator' ] ) ?> </td>
2014-10-18 09:56:58 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Decimal Separator " >< ? php _e ( 'Decimal separator' , 'woocommerce' ) ?> </td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The decimal separator of displayed prices.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $settings [ 'decimal_separator' ] ) ?> </td>
2014-10-18 09:56:58 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Number of Decimals " >< ? php _e ( 'Number of decimals' , 'woocommerce' ) ?> </td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The number of decimal points shown in displayed prices.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $settings [ 'number_of_decimals' ] ) ?> </td>
2013-07-18 14:22:05 +00:00
</ tr >
2015-04-27 20:00:55 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Taxonomies: Product Types " >< ? php _e ( 'Taxonomies: Product types' , 'woocommerce' ); ?> </th>
2016-08-03 17:44:20 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'A list of taxonomy terms that can be used in regard to order/product statuses.' , 'woocommerce' ) ); ?> </td>
< td >< ? php
$display_terms = array ();
foreach ( $settings [ 'taxonomies' ] as $slug => $name ) {
$display_terms [] = strtolower ( $name ) . ' (' . $slug . ')' ;
}
echo implode ( ', ' , array_map ( 'esc_html' , $display_terms ) );
?> </td>
2015-04-27 20:00:55 +00:00
</ tr >
2017-04-10 14:51:14 +00:00
< tr >
< td data - export - label = " Taxonomies: Product Visibility " >< ? php _e ( 'Taxonomies: Product visibility' , 'woocommerce' ); ?> </th>
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'A list of taxonomy terms used for product visibility.' , 'woocommerce' ) ); ?> </td>
< td >< ? php
$display_terms = array ();
foreach ( $settings [ 'product_visibility_terms' ] as $slug => $name ) {
$display_terms [] = strtolower ( $name ) . ' (' . $slug . ')' ;
}
echo implode ( ', ' , array_map ( 'esc_html' , $display_terms ) );
?> </td>
</ tr >
2015-04-27 20:00:55 +00:00
</ tbody >
</ table >
< table class = " wc_status_table widefat " cellspacing = " 0 " >
2013-07-18 14:22:05 +00:00
< thead >
< tr >
2016-10-12 10:16:30 +00:00
< th colspan = " 3 " data - export - label = " WC Pages " >< h2 >< ? php _e ( 'WC pages' , 'woocommerce' ); ?> </h2></th>
2013-07-18 14:22:05 +00:00
</ tr >
</ thead >
< tbody >
< ? php
$alt = 1 ;
2016-08-03 17:44:20 +00:00
foreach ( $pages as $page ) {
2014-11-28 08:06:15 +00:00
$error = false ;
2013-07-18 14:22:05 +00:00
2016-08-03 17:44:20 +00:00
if ( $page [ 'page_id' ] ) {
2016-11-04 15:41:51 +00:00
$page_name = '<a href="' . get_edit_post_link ( $page [ 'page_id' ] ) . '" aria-label="' . sprintf ( __ ( 'Edit %s page' , 'woocommerce' ), esc_html ( $page [ 'page_name' ] ) ) . '">' . esc_html ( $page [ 'page_name' ] ) . '</a>' ;
2014-11-28 08:06:15 +00:00
} else {
2016-08-03 17:44:20 +00:00
$page_name = esc_html ( $page [ 'page_name' ] );
2014-11-28 08:06:15 +00:00
}
2013-07-18 14:22:05 +00:00
2015-01-23 16:19:02 +00:00
echo '<tr><td data-export-label="' . esc_attr ( $page_name ) . '">' . $page_name . ':</td>' ;
2017-04-26 12:51:53 +00:00
echo '<td class="help">' . wc_help_tip ( sprintf ( __ ( 'The URL of your %s page (along with the Page ID).' , 'woocommerce' ), $page_name ) ) . '</td><td>' ;
2013-07-18 14:22:05 +00:00
2015-12-08 16:38:36 +00:00
// Page ID check.
2016-08-03 17:44:20 +00:00
if ( ! $page [ 'page_set' ] ) {
2016-03-08 10:21:06 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . __ ( 'Page not set' , 'woocommerce' ) . '</mark>' ;
2013-07-18 14:22:05 +00:00
$error = true ;
2016-09-01 20:50:14 +00:00
} elseif ( ! $page [ 'page_exists' ] ) {
2016-04-21 11:23:50 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . __ ( 'Page ID is set, but the page does not exist' , 'woocommerce' ) . '</mark>' ;
$error = true ;
2016-09-01 20:50:14 +00:00
} elseif ( ! $page [ 'page_visible' ] ) {
2017-02-24 19:41:56 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( 'Page visibility should be <a href="%s" target="_blank">public</a>' , 'woocommerce' ), 'https://codex.wordpress.org/Content_Visibility' ) . '</mark>' ;
2016-02-17 17:06:28 +00:00
$error = true ;
2013-07-18 14:22:05 +00:00
} else {
// Shortcode check
2016-08-03 17:44:20 +00:00
if ( $page [ 'shortcode_required' ] ) {
if ( ! $page [ 'shortcode_present' ] ) {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf ( __ ( 'Page does not contain the shortcode.' , 'woocommerce' ), $page [ 'shortcode' ] ) . '</mark>' ;
2013-07-18 14:22:05 +00:00
$error = true ;
}
}
}
2017-03-07 20:24:24 +00:00
if ( ! $error ) {
echo '<mark class="yes">#' . absint ( $page [ 'page_id' ] ) . ' - ' . str_replace ( home_url (), '' , get_permalink ( $page [ 'page_id' ] ) ) . '</mark>' ;
}
2013-07-18 14:22:05 +00:00
echo '</td></tr>' ;
}
?>
</ tbody >
2014-10-24 11:49:27 +00:00
</ table >
2015-04-27 20:00:55 +00:00
< table class = " wc_status_table widefat " cellspacing = " 0 " >
2013-07-18 14:22:05 +00:00
< thead >
< tr >
2016-02-17 18:23:50 +00:00
< th colspan = " 3 " data - export - label = " Theme " >< h2 >< ? php _e ( 'Theme' , 'woocommerce' ); ?> </h2></th>
2013-07-18 14:22:05 +00:00
</ tr >
</ thead >
< tbody >
2014-10-24 11:49:27 +00:00
< tr >
2015-01-03 17:45:02 +00:00
< td data - export - label = " Name " >< ? php _e ( 'Name' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The name of the current active theme.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $theme [ 'name' ] ) ?> </td>
2014-10-24 11:49:27 +00:00
</ tr >
< tr >
2015-01-03 17:45:02 +00:00
< td data - export - label = " Version " >< ? php _e ( 'Version' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The installed version of the current active theme.' , 'woocommerce' ) ); ?> </td>
2014-10-24 11:49:27 +00:00
< td >< ? php
2016-08-03 17:44:20 +00:00
echo esc_html ( $theme [ 'version' ] );
if ( version_compare ( $theme [ 'version' ], $theme [ 'version_latest' ], '<' ) ) {
2016-10-29 12:57:09 +00:00
/* translators: %s: theme latest version */
2016-08-03 17:44:20 +00:00
echo ' – <strong style="color:red;">' . sprintf ( __ ( '%s is available' , 'woocommerce' ), esc_html ( $theme [ 'version_latest' ] ) ) . '</strong>' ;
2014-10-24 11:49:27 +00:00
}
?> </td>
</ tr >
< tr >
2015-01-03 17:45:02 +00:00
< td data - export - label = " Author URL " >< ? php _e ( 'Author URL' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The theme developers URL.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $theme [ 'author_url' ] ) ?> </td>
2014-10-24 11:49:27 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Child Theme " >< ? php _e ( 'Child theme' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Displays whether or not the current theme is a child theme.' , 'woocommerce' ) ); ?> </td>
2014-10-24 11:49:27 +00:00
< td >< ? php
2017-04-26 12:51:53 +00:00
echo $theme [ 'is_child_theme' ] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<span class="dashicons dashicons-no-alt"></span> – ' . sprintf ( __ ( 'If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: <a href="%s" target="_blank">How to create a child theme</a>' , 'woocommerce' ), 'https://codex.wordpress.org/Child_Themes' );
2014-10-24 11:49:27 +00:00
?> </td>
</ tr >
< ? php
2016-08-27 04:23:02 +00:00
if ( $theme [ 'is_child_theme' ] ) :
2014-10-24 11:49:27 +00:00
?>
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Parent Theme Name " >< ? php _e ( 'Parent theme name' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The name of the parent theme.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $theme [ 'parent_name' ] ); ?> </td>
2014-10-24 11:49:27 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Parent Theme Version " >< ? php _e ( 'Parent theme version' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The installed version of the parent theme.' , 'woocommerce' ) ); ?> </td>
2015-11-02 10:01:42 +00:00
< td >< ? php
2016-08-03 17:44:20 +00:00
echo esc_html ( $theme [ 'parent_version' ] );
if ( version_compare ( $theme [ 'parent_version' ], $theme [ 'parent_version_latest' ], '<' ) ) {
2016-10-29 12:57:09 +00:00
/* translators: %s: parant theme latest version */
2016-08-03 17:44:20 +00:00
echo ' – <strong style="color:red;">' . sprintf ( __ ( '%s is available' , 'woocommerce' ), esc_html ( $theme [ 'parent_version_latest' ] ) ) . '</strong>' ;
2015-11-02 10:01:42 +00:00
}
?> </td>
2014-10-24 11:49:27 +00:00
</ tr >
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Parent Theme Author URL " >< ? php _e ( 'Parent theme author URL' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'The parent theme developers URL.' , 'woocommerce' ) ); ?> </td>
2016-08-03 17:44:20 +00:00
< td >< ? php echo esc_html ( $theme [ 'parent_author_url' ] ) ?> </td>
2014-10-24 11:49:27 +00:00
</ tr >
< ? php endif ?>
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " WooCommerce Support " >< ? php _e ( 'WooCommerce support' , 'woocommerce' ); ?> :</td>
2015-10-23 15:09:08 +00:00
< td class = " help " >< ? php echo wc_help_tip ( __ ( 'Displays whether or not the current active theme declares WooCommerce support.' , 'woocommerce' ) ); ?> </td>
2017-03-07 20:24:24 +00:00
< td >
< ? php if ( ! $theme [ 'has_woocommerce_support' ] ) {
2016-10-12 10:16:30 +00:00
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . __ ( 'Not declared' , 'woocommerce' ) . '</mark>' ;
2014-10-24 11:49:27 +00:00
} else {
2016-03-08 10:21:06 +00:00
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' ;
2017-03-07 20:24:24 +00:00
} ?>
</ td >
2014-10-24 11:49:27 +00:00
</ tr >
2013-07-18 14:22:05 +00:00
</ tbody >
2014-10-24 11:49:27 +00:00
</ table >
2015-04-27 20:00:55 +00:00
< table class = " wc_status_table widefat " cellspacing = " 0 " >
2013-07-18 14:22:05 +00:00
< thead >
< tr >
2016-02-17 18:23:50 +00:00
< th colspan = " 3 " data - export - label = " Templates " >< h2 >< ? php _e ( 'Templates' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This section shows any files that are overriding the default WooCommerce template pages.', 'woocommerce' ) ); ?></h2></th>
2013-07-18 14:22:05 +00:00
</ tr >
</ thead >
< tbody >
2016-08-03 17:44:20 +00:00
< ? php if ( $theme [ 'has_woocommerce_file' ] ) : ?>
2016-04-20 09:37:54 +00:00
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Archive Template " >< ? php _e ( 'Archive template' , 'woocommerce' ); ?> :</td>
2016-04-20 09:37:54 +00:00
< td class = " help " >& nbsp ; </ td >
< td >< ? php _e ( 'Your theme has a woocommerce.php file, you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues.' , 'woocommerce' ); ?> </td>
</ tr >
< ? php endif ?>
2014-06-09 13:57:02 +00:00
< ? php
2016-08-03 17:44:20 +00:00
if ( ! empty ( $theme [ 'overrides' ] ) ) { ?>
2014-06-09 13:57:02 +00:00
< tr >
2016-08-03 17:44:20 +00:00
< td data - export - label = " Overrides " >< ? php _e ( 'Overrides' , 'woocommerce' ); ?> </td>
2014-10-24 11:49:27 +00:00
< td class = " help " >& nbsp ; </ td >
2016-08-03 17:44:20 +00:00
< td >
< ? php
2016-09-13 21:24:21 +00:00
$total_overrides = count ( $theme [ 'overrides' ] );
for ( $i = 0 ; $i < $total_overrides ; $i ++ ) {
2016-08-03 17:44:20 +00:00
$override = $theme [ 'overrides' ][ $i ];
if ( $override [ 'core_version' ] && ( empty ( $override [ 'version' ] ) || version_compare ( $override [ 'version' ], $override [ 'core_version' ], '<' ) ) ) {
2016-10-24 23:56:38 +00:00
$current_version = $override [ 'version' ] ? $override [ 'version' ] : '-' ;
printf (
__ ( '%1$s version %2$s is out of date. The core version is %3$s' , 'woocommerce' ),
'<code>' . $override [ 'file' ] . '</code>' ,
'<strong style="color:red">' . $current_version . '</strong>' ,
$override [ 'core_version' ]
);
2016-08-03 17:44:20 +00:00
} else {
echo esc_html ( $override [ 'file' ] );
}
2016-09-09 00:14:28 +00:00
if ( ( count ( $theme [ 'overrides' ] ) - 1 ) !== $i ) {
2016-08-03 17:44:20 +00:00
echo ', ' ;
}
echo '<br />' ;
}
?>
</ td >
2014-06-09 13:57:02 +00:00
</ tr >
2014-02-11 13:33:56 +00:00
< ? php
2014-06-09 13:57:02 +00:00
} else {
?>
< tr >
2015-01-03 17:45:02 +00:00
< td data - export - label = " Overrides " >< ? php _e ( 'Overrides' , 'woocommerce' ); ?> :</td>
2014-10-24 11:49:27 +00:00
< td class = " help " >& nbsp ; </ td >
2015-01-03 17:45:02 +00:00
< td >& ndash ; </ td >
2014-06-09 13:57:02 +00:00
</ tr >
< ? php
}
2014-10-18 09:56:58 +00:00
2016-08-03 17:44:20 +00:00
if ( true === $theme [ 'has_outdated_templates' ] ) {
2014-10-18 09:56:58 +00:00
?>
< tr >
2016-10-12 10:16:30 +00:00
< td data - export - label = " Outdated Templates " >< ? php _e ( 'Outdated templates' , 'woocommerce' ); ?> :</td>
2014-10-24 11:49:27 +00:00
< td class = " help " >& nbsp ; </ td >
2016-08-03 17:44:20 +00:00
< td >< mark class = " error " >< span class = " dashicons dashicons-warning " ></ span ></ mark >< a href = " https://docs.woocommerce.com/document/fix-outdated-templates-woocommerce/ " target = " _blank " >< ? php _e ( 'Learn how to update' , 'woocommerce' ) ?> </a></td>
2014-10-18 09:56:58 +00:00
</ tr >
< ? php
}
2014-06-09 13:57:02 +00:00
?>
2013-07-18 14:22:05 +00:00
</ tbody >
</ table >
2015-02-23 15:07:14 +00:00
< ? php do_action ( 'woocommerce_system_status_report' ); ?>