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rc.2 3.1.0 6.2.1 3.1.1 6.2.2 3.1.2 6.2.3 3.2.0 6.3.0 3.2.1 6.3.0-beta.1 3.2.2 6.3.0-rc.1 3.2.3 6.3.0-rc.2 3.2.4 6.3.1 3.2.5 6.3.2 3.2.6 6.4.0 3.3.0 6.4.0-beta.1 3.3.1 6.4.0-rc.1 3.3.2 6.4.1 3.3.2-rc.1 6.4.2 3.3.3 6.5.0 3.3.4 6.5.0-beta.1 3.3.5 6.5.0-rc.1 3.3.6 6.5.0-rc.2 3.4.0 6.5.1 3.4.0-beta.1 6.5.2 3.4.0-rc.2 6.6.0 3.4.1 6.6.0-beta.1 3.4.2 6.6.0-rc.1 3.4.3 6.6.0-rc.2 3.4.4 6.6.1 3.4.5 6.6.2 3.4.6 6.7.0 3.4.7 6.7.0-beta.1 3.4.8 6.7.0-beta.2 3.5.0 6.7.0-rc.1 3.5.0-beta.1 6.7.1 3.5.0-rc.1 6.8.0 3.5.0-rc.2 6.8.0-beta.1 3.5.1 6.8.0-beta.2 3.5.10 6.8.0-rc.1 3.5.2 6.8.1 3.5.3 6.8.2 3.5.4 6.8.3 3.5.5 6.9.0 3.5.6 6.9.0-beta.1 3.5.7 6.9.0-beta.2 3.5.8 6.9.0-rc.1 3.5.9 6.9.1 3.6.0 6.9.2 3.6.0-beta.1 6.9.3 3.6.0-rc.1 6.9.4 3.6.0-rc.2 6.9.5 3.6.0-rc.3 7.0.0 3.6.1 7.0.0-beta.1 3.6.2 7.0.0-beta.2 3.6.3 7.0.0-beta.3 3.6.4 7.0.0-rc.1 3.6.5 7.0.0-rc.2 3.6.6 7.0.1 3.6.7 7.0.2 3.7.0 7.1.0 3.7.0-beta.1 7.1.0-beta.1 3.7.0-rc.1 7.1.0-beta.2 3.7.0-rc.2 7.1.0-rc.1 3.7.1 7.1.0-rc.2 3.7.2 7.1.1
woocommerce / includes / admin / views / html-admin-page-status-report.php
woocommerce / includes / admin / views Last commit date
html-admin-dashboard-setup.php 5 months ago html-admin-page-addons-category-nav.php 4 years ago html-admin-page-product-export.php 1 year ago html-admin-page-reports.php 2 years ago html-admin-page-status-logs-db.php 2 years ago html-admin-page-status-logs.php 2 years ago html-admin-page-status-report.php 1 month ago html-admin-page-status-tools.php 2 years ago html-admin-page-status.php 8 years ago html-admin-settings.php 1 month ago html-bulk-edit-product.php 1 year ago html-email-template-preview.php 1 year ago html-notice-base-table-missing.php 3 years ago html-notice-custom.php 8 years ago html-notice-download-dir-sync-complete.php 2 years ago html-notice-install.php 5 years ago html-notice-legacy-shipping.php 11 months ago html-notice-maxmind-license-key.php 6 years ago html-notice-no-shipping-methods.php 2 years ago html-notice-redirect-only-download.php 4 years ago html-notice-regenerating-lookup-table.php 5 years ago html-notice-regenerating-thumbnails.php 8 years ago html-notice-secure-connection.php 2 years ago html-notice-sync-on-read-disabled.php 3 months ago html-notice-template-check.php 2 years ago html-notice-update.php 4 months ago html-notice-updated.php 7 years ago html-notice-updating.php 6 years ago html-notice-uploads-directory-is-unprotected.php 2 years ago html-notice-wp-php-minimum-requirements.php 2 years ago html-quick-edit-product.php 1 year ago html-report-by-date.php 5 years ago
html-admin-page-status-report.php
1125 lines
1 <?php
2 /**
3 * Admin View: Page - Status Report.
4 *
5 * @package WooCommerce
6 */
7
8 use Automattic\Jetpack\Constants;
9 use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils;
10 use Automattic\WooCommerce\Utilities\RestApiUtil;
11
12 defined( 'ABSPATH' ) || exit;
13
14 global $wpdb;
15
16 $report = wc_get_container()->get( RestApiUtil::class )->get_endpoint_data( '/wc/v3/system_status' );
17 $environment = $report['environment'];
18 $database = $report['database'];
19 $post_type_counts = isset( $report['post_type_counts'] ) ? $report['post_type_counts'] : array();
20 $active_plugins = $report['active_plugins'];
21 $inactive_plugins = $report['inactive_plugins'];
22 $dropins_mu_plugins = $report['dropins_mu_plugins'];
23 $theme = $report['theme'];
24 $security = $report['security'];
25 $settings = $report['settings'];
26 $logging = $report['logging'];
27 $wp_pages = $report['pages'];
28 $plugin_updates = new WC_Plugin_Updates();
29 $untested_plugins = $plugin_updates->get_untested_plugins( WC()->version, Constants::get_constant( 'WC_SSR_PLUGIN_UPDATE_RELEASE_VERSION_TYPE' ) );
30
31 $active_plugins_count = is_countable( $active_plugins ) ? count( $active_plugins ) : 0;
32 $inactive_plugins_count = is_countable( $inactive_plugins ) ? count( $inactive_plugins ) : 0;
33
34 // Include necessary WordPress file to use get_plugin_data().
35 if ( ! function_exists( 'get_plugin_data' ) ) {
36 require_once ABSPATH . 'wp-admin/includes/plugin.php';
37 }
38 // Define the path to the main WooCommerce plugin file using the correct constant.
39 $plugin_path = WP_PLUGIN_DIR . '/woocommerce/woocommerce.php';
40 // Initialize the WooCommerce version variable.
41 $wc_version = '';
42 // Check if the plugin file exists before trying to access it.
43 if ( file_exists( $plugin_path ) ) {
44 $plugin_data = get_plugin_data( $plugin_path );
45 $wc_version = $plugin_data['Version'] ?? ''; // Use null coalescing operator to handle undefined index.
46 }
47
48 ?>
49 <div class="updated woocommerce-message inline">
50 <p>
51 <?php esc_html_e( 'Please copy and paste this information in your ticket when contacting support:', 'woocommerce' ); ?>
52 </p>
53 <p class="submit">
54 <a href="#" class="button-primary debug-report"><?php esc_html_e( 'Get system report', 'woocommerce' ); ?></a>
55 <a class="button-secondary docs" href="https://woocommerce.com/document/understanding-the-woocommerce-system-status-report/" target="_blank">
56 <?php esc_html_e( 'Understanding the status report', 'woocommerce' ); ?>
57 </a>
58 </p>
59 <div id="debug-report">
60 <textarea readonly="readonly"></textarea>
61 <p class="submit">
62 <button id="download-for-support" class="button-primary" href="#">
63 <?php esc_html_e( 'Download for support', 'woocommerce' ); ?>
64 </button>
65 <button id="copy-for-support" class="button" href="#" data-tip="<?php esc_attr_e( 'Copied!', 'woocommerce' ); ?>">
66 <?php esc_html_e( 'Copy for support', 'woocommerce' ); ?>
67 </button>
68 <button id="copy-for-github" class="button" href="#" data-tip="<?php esc_attr_e( 'Copied!', 'woocommerce' ); ?>">
69 <?php esc_html_e( 'Copy for GitHub', 'woocommerce' ); ?>
70 </button>
71 </p>
72 <p class="copy-error hidden">
73 <?php esc_html_e( 'Copying to clipboard failed. Please press Ctrl/Cmd+C to copy.', 'woocommerce' ); ?>
74 </p>
75 </div>
76 </div>
77 <table class="wc_status_table widefat" cellspacing="0" id="status">
78 <thead>
79 <tr>
80 <th colspan="3" data-export-label="WordPress Environment"><h2><?php esc_html_e( 'WordPress environment', 'woocommerce' ); ?></h2></th>
81 </tr>
82 </thead>
83 <tbody>
84 <tr>
85 <td data-export-label="WordPress address (URL)"><?php esc_html_e( 'WordPress address (URL)', 'woocommerce' ); ?>:</td>
86 <td class="help"><?php echo wc_help_tip( esc_html__( 'The root URL of your site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
87 <td><?php echo esc_html( $environment['site_url'] ); ?></td>
88 </tr>
89 <tr>
90 <td data-export-label="Site address (URL)"><?php esc_html_e( 'Site address (URL)', 'woocommerce' ); ?>:</td>
91 <td class="help"><?php echo wc_help_tip( esc_html__( 'The homepage URL of your site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
92 <td><?php echo esc_html( $environment['home_url'] ); ?></td>
93 </tr>
94 <tr>
95 <td data-export-label="WC Version"><?php esc_html_e( 'WooCommerce version', 'woocommerce' ); ?>:</td>
96 <td class="help"><?php echo wc_help_tip( esc_html__( 'The version of WooCommerce installed on your site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
97 <td><?php echo esc_html( ! empty( $wc_version ) ? $wc_version : $environment['version'] ); ?></td>
98
99 </tr>
100 <tr>
101 <td data-export-label="Action Scheduler Version"><?php esc_html_e( 'Action Scheduler package', 'woocommerce' ); ?>:</td>
102 <td class="help"><?php echo wc_help_tip( esc_html__( 'Action Scheduler package running on your site.', 'woocommerce' ) ); ?></td>
103 <td>
104 <?php
105 if ( class_exists( 'ActionScheduler_Versions' ) && class_exists( 'ActionScheduler' ) ) {
106 $version = ActionScheduler_Versions::instance()->latest_version();
107 $path = ActionScheduler::plugin_path( '' ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
108 } else {
109 $version = null;
110 }
111
112 if ( ! is_null( $version ) ) {
113 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span> ' . esc_html( $version ) . ' <code class="private">' . esc_html( $path ) . '</code></mark> ';
114 } else {
115 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Unable to detect the Action Scheduler package.', 'woocommerce' ) . '</mark>';
116 }
117 ?>
118 </td>
119 </tr>
120 <tr>
121 <td data-export-label="Log Directory Writable"><?php esc_html_e( 'Log directory writable', 'woocommerce' ); ?>:</td>
122 <td class="help"><?php echo wc_help_tip( esc_html__( 'Several WooCommerce extensions can write logs which makes debugging problems easier. The directory must be writable for this to happen.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
123 <td>
124 <?php
125 if ( $environment['log_directory_writable'] ) {
126 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span> <code class="private">' . esc_html( $environment['log_directory'] ) . '</code></mark> ';
127 } else {
128 printf(
129 '<mark class="error"><span class="dashicons dashicons-warning"></span> %s</mark>',
130 sprintf(
131 // Translators: %s: Log directory path.
132 esc_html__( 'To allow logging, make %s writable.', 'woocommerce' ),
133 '<code>' . esc_html( $environment['log_directory'] ) . '</code>'
134 )
135 );
136 }
137 ?>
138 </td>
139 </tr>
140 <tr>
141 <td data-export-label="WP Version"><?php esc_html_e( 'WordPress version', 'woocommerce' ); ?>:</td>
142 <td class="help"><?php echo wc_help_tip( esc_html__( 'The version of WordPress installed on your site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
143 <td>
144 <?php
145 $latest_version = get_transient( 'woocommerce_system_status_wp_version_check' );
146
147 if ( false === $latest_version ) {
148 $version_check = wp_remote_get( 'https://api.wordpress.org/core/version-check/1.7/' );
149 $api_response = json_decode( wp_remote_retrieve_body( $version_check ), true );
150
151 if ( $api_response && isset( $api_response['offers'], $api_response['offers'][0], $api_response['offers'][0]['version'] ) ) {
152 $latest_version = $api_response['offers'][0]['version'];
153 } else {
154 $latest_version = $environment['wp_version'];
155 }
156 set_transient( 'woocommerce_system_status_wp_version_check', $latest_version, DAY_IN_SECONDS );
157 }
158
159 if ( version_compare( $environment['wp_version'], $latest_version, '<' ) ) {
160 /* Translators: %1$s: Current version, %2$s: New version */
161 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%1$s - There is a newer version of WordPress available (%2$s)', 'woocommerce' ), esc_html( $environment['wp_version'] ), esc_html( $latest_version ) ) . '</mark>';
162 } else {
163 echo '<mark class="yes">' . esc_html( $environment['wp_version'] ) . '</mark>';
164 }
165 ?>
166 </td>
167 </tr>
168 <tr>
169 <td data-export-label="WP Multisite"><?php esc_html_e( 'WordPress multisite', 'woocommerce' ); ?>:</td>
170 <td class="help"><?php echo wc_help_tip( esc_html__( 'Whether or not you have WordPress Multisite enabled.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
171 <td><?php echo ( $environment['wp_multisite'] ) ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
172 </tr>
173 <tr>
174 <td data-export-label="WP Memory Limit"><?php esc_html_e( 'WordPress memory limit', 'woocommerce' ); ?>:</td>
175 <td class="help"><?php echo wc_help_tip( esc_html__( 'The maximum amount of memory (RAM) that your site can use at one time.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
176 <td>
177 <?php
178 if ( $environment['wp_memory_limit'] < 67108864 ) {
179 /* Translators: %1$s: Memory limit, %2$s: Docs link. */
180 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%1$s - We recommend setting memory to at least 64MB. See: %2$s', 'woocommerce' ), esc_html( size_format( $environment['wp_memory_limit'] ) ), '<a href="https://wordpress.org/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php" target="_blank">' . esc_html__( 'Increasing memory allocated to PHP', 'woocommerce' ) . '</a>' ) . '</mark>';
181 } else {
182 echo '<mark class="yes">' . esc_html( size_format( $environment['wp_memory_limit'] ) ) . '</mark>';
183 }
184 ?>
185 </td>
186 </tr>
187 <tr>
188 <td data-export-label="WP Debug Mode"><?php esc_html_e( 'WordPress debug mode', 'woocommerce' ); ?>:</td>
189 <td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether or not WordPress is in Debug Mode.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
190 <td>
191 <?php if ( $environment['wp_debug_mode'] ) : ?>
192 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
193 <?php else : ?>
194 <mark class="no">&ndash;</mark>
195 <?php endif; ?>
196 </td>
197 </tr>
198 <tr>
199 <td data-export-label="WP Cron"><?php esc_html_e( 'WordPress cron', 'woocommerce' ); ?>:</td>
200 <td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether or not WP Cron Jobs are enabled.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
201 <td>
202 <?php if ( $environment['wp_cron'] ) : ?>
203 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
204 <?php else : ?>
205 <mark class="no">&ndash;</mark>
206 <?php endif; ?>
207 </td>
208 </tr>
209 <tr>
210 <td data-export-label="WP Environment Type"><?php esc_html_e( 'Environment type', 'woocommerce' ); ?>:</td>
211 <td class="help"><?php echo wc_help_tip( esc_html__( 'The current environment type set for this site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
212 <td><?php echo esc_html( $environment['wp_environment_type'] ); ?></td>
213 </tr>
214 <tr>
215 <td data-export-label="Language"><?php esc_html_e( 'Language', 'woocommerce' ); ?>:</td>
216 <td class="help"><?php echo wc_help_tip( esc_html__( 'The current language used by WordPress. Default = English', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
217 <td><?php echo esc_html( $environment['language'] ); ?></td>
218 </tr>
219 <tr>
220 <td data-export-label="External object cache"><?php esc_html_e( 'External object cache', 'woocommerce' ); ?>:</td>
221 <td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether or not WordPress is using an external object cache.', 'woocommerce' ) ); ?></td>
222 <td>
223 <?php if ( $environment['external_object_cache'] ) : ?>
224 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
225 <?php else : ?>
226 <mark class="no">&ndash;</mark>
227 <?php endif; ?>
228 </td>
229 </tr>
230 </tbody>
231 </table>
232 <table class="wc_status_table widefat" cellspacing="0">
233 <thead>
234 <tr>
235 <th colspan="3" data-export-label="Server Environment"><h2><?php esc_html_e( 'Server environment', 'woocommerce' ); ?></h2></th>
236 </tr>
237 </thead>
238 <tbody>
239 <tr>
240 <td data-export-label="Server Info"><?php esc_html_e( 'Server info', 'woocommerce' ); ?>:</td>
241 <td class="help"><?php echo wc_help_tip( esc_html__( 'Information about the web server that is currently hosting your site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
242 <td><?php echo esc_html( $environment['server_info'] ); ?></td>
243 </tr>
244 <tr>
245 <td data-export-label="Server Architecture"><?php esc_html_e( 'Server architecture', 'woocommerce' ); ?>:</td>
246 <td class="help"><?php echo wc_help_tip( esc_html__( 'Information about the operating system your server is running.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
247 <td><?php echo ! empty( $environment['server_architecture'] ) ? esc_html( $environment['server_architecture'] ) : esc_html__( 'Unable to determine server architecture. Please ask your hosting provider for this information.', 'woocommerce' ); ?></td>
248 </tr>
249 <tr>
250 <td data-export-label="PHP Version"><?php esc_html_e( 'PHP version', 'woocommerce' ); ?>:</td>
251 <td class="help"><?php echo wc_help_tip( esc_html__( 'The version of PHP installed on your hosting server.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
252 <td>
253 <?php echo '<mark class="yes">' . esc_html( $environment['php_version'] ) . '</mark>'; ?>
254 </td>
255 </tr>
256 <?php if ( function_exists( 'ini_get' ) ) : ?>
257 <tr>
258 <td data-export-label="PHP Post Max Size"><?php esc_html_e( 'PHP post max size', 'woocommerce' ); ?>:</td>
259 <td class="help"><?php echo wc_help_tip( esc_html__( 'The largest filesize that can be contained in one post.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
260 <td><?php echo esc_html( size_format( $environment['php_post_max_size'] ) ); ?></td>
261 </tr>
262 <tr>
263 <td data-export-label="PHP Time Limit"><?php esc_html_e( 'PHP time limit', 'woocommerce' ); ?>:</td>
264 <td class="help"><?php echo wc_help_tip( esc_html__( 'The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
265 <td><?php echo esc_html( $environment['php_max_execution_time'] ); ?></td>
266 </tr>
267 <tr>
268 <td data-export-label="PHP Max Input Vars"><?php esc_html_e( 'PHP max input vars', 'woocommerce' ); ?>:</td>
269 <td class="help"><?php echo wc_help_tip( esc_html__( 'The maximum number of variables your server can use for a single function to avoid overloads.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
270 <td><?php echo esc_html( $environment['php_max_input_vars'] ); ?></td>
271 </tr>
272 <tr>
273 <td data-export-label="cURL Version"><?php esc_html_e( 'cURL version', 'woocommerce' ); ?>:</td>
274 <td class="help"><?php echo wc_help_tip( esc_html__( 'The version of cURL installed on your server.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
275 <td><?php echo esc_html( $environment['curl_version'] ); ?></td>
276 </tr>
277 <tr>
278 <td data-export-label="SUHOSIN Installed"><?php esc_html_e( 'SUHOSIN installed', 'woocommerce' ); ?>:</td>
279 <td class="help"><?php echo wc_help_tip( esc_html__( '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' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
280 <td><?php echo $environment['suhosin_installed'] ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
281 </tr>
282 <?php endif; ?>
283
284 <?php
285
286 if ( $environment['mysql_version'] ) :
287 ?>
288 <tr>
289 <td data-export-label="MySQL Version"><?php esc_html_e( 'MySQL version', 'woocommerce' ); ?>:</td>
290 <td class="help"><?php echo wc_help_tip( esc_html__( 'The version of MySQL installed on your hosting server.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
291 <td>
292 <?php
293 if ( version_compare( $environment['mysql_version'], '5.6', '<' ) && ! strstr( $environment['mysql_version_string'], 'MariaDB' ) ) {
294 /* Translators: %1$s: MySQL version, %2$s: Recommended MySQL version. */
295 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%1$s - We recommend a minimum MySQL version of 5.6. See: %2$s', 'woocommerce' ), esc_html( $environment['mysql_version_string'] ), '<a href="https://wordpress.org/about/requirements/" target="_blank">' . esc_html__( 'WordPress requirements', 'woocommerce' ) . '</a>' ) . '</mark>';
296 } else {
297 echo '<mark class="yes">' . esc_html( $environment['mysql_version_string'] ) . '</mark>';
298 }
299 ?>
300 </td>
301 </tr>
302 <?php endif; ?>
303 <tr>
304 <td data-export-label="Max Upload Size"><?php esc_html_e( 'Max upload size', 'woocommerce' ); ?>:</td>
305 <td class="help"><?php echo wc_help_tip( esc_html__( 'The largest filesize that can be uploaded to your WordPress installation.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
306 <td><?php echo esc_html( size_format( $environment['max_upload_size'] ) ); ?></td>
307 </tr>
308 <tr>
309 <td data-export-label="Default Timezone is UTC"><?php esc_html_e( 'Default timezone is UTC', 'woocommerce' ); ?>:</td>
310 <td class="help"><?php echo wc_help_tip( esc_html__( 'The default timezone for your server.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
311 <td>
312 <?php
313 if ( 'UTC' !== $environment['default_timezone'] ) {
314 /* Translators: %s: default timezone.. */
315 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'woocommerce' ), esc_html( $environment['default_timezone'] ) ) . '</mark>';
316 } else {
317 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
318 }
319 ?>
320 </td>
321 </tr>
322 <tr>
323 <td data-export-label="fsockopen/cURL"><?php esc_html_e( 'fsockopen/cURL', 'woocommerce' ); ?>:</td>
324 <td class="help"><?php echo wc_help_tip( esc_html__( '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' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
325 <td>
326 <?php
327 if ( $environment['fsockopen_or_curl_enabled'] ) {
328 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
329 } else {
330 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( '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>';
331 }
332 ?>
333 </td>
334 </tr>
335 <tr>
336 <td data-export-label="SoapClient"><?php esc_html_e( 'SoapClient', 'woocommerce' ); ?>:</td>
337 <td class="help"><?php echo wc_help_tip( esc_html__( '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' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
338 <td>
339 <?php
340 if ( $environment['soapclient_enabled'] ) {
341 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
342 } else {
343 /* Translators: %s classname and link. */
344 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '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>';
345 }
346 ?>
347 </td>
348 </tr>
349 <tr>
350 <td data-export-label="DOMDocument"><?php esc_html_e( 'DOMDocument', 'woocommerce' ); ?>:</td>
351 <td class="help"><?php echo wc_help_tip( esc_html__( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
352 <td>
353 <?php
354 if ( $environment['domdocument_enabled'] ) {
355 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
356 } else {
357 /* Translators: %s: classname and link. */
358 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '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>';
359 }
360 ?>
361 </td>
362 </tr>
363 <tr>
364 <td data-export-label="GZip"><?php esc_html_e( 'GZip', 'woocommerce' ); ?>:</td>
365 <td class="help"><?php echo wc_help_tip( esc_html__( 'GZip (gzopen) is used to open the GEOIP database from MaxMind.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
366 <td>
367 <?php
368 if ( $environment['gzip_enabled'] ) {
369 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
370 } else {
371 /* Translators: %s: classname and link. */
372 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '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>';
373 }
374 ?>
375 </td>
376 </tr>
377 <tr>
378 <td data-export-label="Multibyte String"><?php esc_html_e( 'Multibyte string', 'woocommerce' ); ?>:</td>
379 <td class="help"><?php echo wc_help_tip( esc_html__( 'Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
380 <td>
381 <?php
382 if ( $environment['mbstring_enabled'] ) {
383 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
384 } else {
385 /* Translators: %s: classname and link. */
386 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '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>';
387 }
388 ?>
389 </td>
390 </tr>
391 <tr>
392 <td data-export-label="Remote Post"><?php esc_html_e( 'Remote post', 'woocommerce' ); ?>:</td>
393 <td class="help"><?php echo wc_help_tip( esc_html__( 'PayPal uses this method of communicating when sending back transaction information.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
394 <td>
395 <?php
396 if ( $environment['remote_post_successful'] ) {
397 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
398 } else {
399 /* Translators: %s: function name. */
400 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%s failed. Contact your hosting provider.', 'woocommerce' ), 'wp_remote_post()' ) . ' ' . esc_html( $environment['remote_post_response'] ) . '</mark>';
401 }
402 ?>
403 </td>
404 </tr>
405 <tr>
406 <td data-export-label="Remote Get"><?php esc_html_e( 'Remote get', 'woocommerce' ); ?>:</td>
407 <td class="help"><?php echo wc_help_tip( esc_html__( 'WooCommerce plugins may use this method of communication when checking for plugin updates.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
408 <td>
409 <?php
410 if ( $environment['remote_get_successful'] ) {
411 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
412 } else {
413 /* Translators: %s: function name. */
414 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%s failed. Contact your hosting provider.', 'woocommerce' ), 'wp_remote_get()' ) . ' ' . esc_html( $environment['remote_get_response'] ) . '</mark>';
415 }
416 ?>
417 </td>
418 </tr>
419 <?php
420 // phpcs:disable WooCommerce.Commenting.CommentHooks.MissingSinceComment
421 /**
422 * Filters the environment rows to show in the WooCommerce status report.
423 */
424 $rows = apply_filters( 'woocommerce_system_status_environment_rows', array() );
425 // phpcs:enable WooCommerce.Commenting.CommentHooks.MissingSinceVersionComment
426 foreach ( $rows as $row ) {
427 if ( ! empty( $row['success'] ) ) {
428 $css_class = 'yes';
429 $icon = '<span class="dashicons dashicons-yes"></span>';
430 } else {
431 $css_class = 'error';
432 $icon = '<span class="dashicons dashicons-no-alt"></span>';
433 }
434 ?>
435 <tr>
436 <td data-export-label="<?php echo esc_attr( $row['name'] ); ?>"><?php echo esc_html( $row['name'] ); ?>:</td>
437 <td class="help"><?php echo esc_html( isset( $row['help'] ) ? $row['help'] : '' ); ?></td>
438 <td>
439 <mark class="<?php echo esc_attr( $css_class ); ?>">
440 <?php echo wp_kses_post( $icon ); ?> <?php echo wp_kses_data( ! empty( $row['note'] ) ? $row['note'] : '' ); ?>
441 </mark>
442 </td>
443 </tr>
444 <?php
445 }
446 ?>
447 </tbody>
448 </table>
449 <table id="status-database" class="wc_status_table widefat" cellspacing="0">
450 <thead>
451 <tr>
452 <th colspan="3" data-export-label="Database">
453 <h2>
454 <?php
455 esc_html_e( 'Database', 'woocommerce' );
456 self::output_tables_info();
457 ?>
458 </h2>
459 </th>
460 </tr>
461 </thead>
462 <tbody>
463 <tr>
464 <td data-export-label="WC Database Version"><?php esc_html_e( 'WooCommerce database version', 'woocommerce' ); ?>:</td>
465 <td class="help"><?php echo wc_help_tip( esc_html__( 'The database version for WooCommerce. This should be the same as your WooCommerce version.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
466 <td><?php echo esc_html( $database['wc_database_version'] ); ?></td>
467 </tr>
468 <tr>
469 <td data-export-label="WC Database Prefix"><?php esc_html_e( 'Database prefix', 'woocommerce' ); ?></td>
470 <td class="help">&nbsp;</td>
471 <td>
472 <?php
473 if ( strlen( $database['database_prefix'] ) > 20 ) {
474 /* Translators: %1$s: Database prefix, %2$s: Docs link. */
475 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%1$s - We recommend using a prefix with less than 20 characters. See: %2$s', 'woocommerce' ), esc_html( $database['database_prefix'] ), '<a href="https://woocommerce.com/document/completed-order-email-doesnt-contain-download-links/#section-2" target="_blank">' . esc_html__( 'How to update your database table prefix', 'woocommerce' ) . '</a>' ) . '</mark>';
476 } else {
477 echo '<mark class="yes">' . esc_html( $database['database_prefix'] ) . '</mark>';
478 }
479 ?>
480 </td>
481 </tr>
482
483 <?php if ( ! empty( $database['database_size'] ) && ! empty( $database['database_tables'] ) ) : ?>
484 <tr>
485 <td><?php esc_html_e( 'Total Database Size', 'woocommerce' ); ?></td>
486 <td class="help">&nbsp;</td>
487 <td><?php printf( '%.2fMB', esc_html( $database['database_size']['data'] + $database['database_size']['index'] ) ); ?></td>
488 </tr>
489
490 <tr>
491 <td><?php esc_html_e( 'Database Data Size', 'woocommerce' ); ?></td>
492 <td class="help">&nbsp;</td>
493 <td><?php printf( '%.2fMB', esc_html( $database['database_size']['data'] ) ); ?></td>
494 </tr>
495
496 <tr>
497 <td><?php esc_html_e( 'Database Index Size', 'woocommerce' ); ?></td>
498 <td class="help">&nbsp;</td>
499 <td><?php printf( '%.2fMB', esc_html( $database['database_size']['index'] ) ); ?></td>
500 </tr>
501
502 <?php foreach ( $database['database_tables']['woocommerce'] as $table => $table_data ) { ?>
503 <tr>
504 <td><?php echo esc_html( $table ); ?></td>
505 <td class="help">&nbsp;</td>
506 <td>
507 <?php
508 if ( ! $table_data ) {
509 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Table does not exist', 'woocommerce' ) . '</mark>';
510 } else {
511 /* Translators: %1$f: Table size, %2$f: Index size, %3$s Engine. */
512 printf( esc_html__( 'Data: %1$.2fMB + Index: %2$.2fMB + Engine %3$s', 'woocommerce' ), esc_html( wc_format_decimal( $table_data['data'], 2 ) ), esc_html( wc_format_decimal( $table_data['index'], 2 ) ), esc_html( $table_data['engine'] ) );
513 }
514 ?>
515 </td>
516 </tr>
517 <?php } ?>
518
519 <?php foreach ( $database['database_tables']['other'] as $table => $table_data ) { ?>
520 <tr>
521 <td><?php echo esc_html( $table ); ?></td>
522 <td class="help">&nbsp;</td>
523 <td>
524 <?php
525 /* Translators: %1$f: Table size, %2$f: Index size, %3$s Engine. */
526 printf( esc_html__( 'Data: %1$.2fMB + Index: %2$.2fMB + Engine %3$s', 'woocommerce' ), esc_html( wc_format_decimal( $table_data['data'], 2 ) ), esc_html( wc_format_decimal( $table_data['index'], 2 ) ), esc_html( $table_data['engine'] ) );
527 ?>
528 </td>
529 </tr>
530 <?php } ?>
531 <?php else : ?>
532 <tr>
533 <td><?php esc_html_e( 'Database information:', 'woocommerce' ); ?></td>
534 <td class="help">&nbsp;</td>
535 <td>
536 <?php
537 esc_html_e(
538 'Unable to retrieve database information. Usually, this is not a problem, and it only means that your install is using a class that replaces the WordPress database class (e.g., HyperDB) and WooCommerce is unable to get database information.',
539 'woocommerce'
540 );
541 ?>
542 </td>
543 </tr>
544 <?php endif; ?>
545 </tbody>
546 </table>
547 <?php if ( $post_type_counts ) : ?>
548 <table class="wc_status_table widefat" cellspacing="0">
549 <thead>
550 <tr>
551 <th colspan="3" data-export-label="Post Type Counts"><h2><?php esc_html_e( 'Post Type Counts', 'woocommerce' ); ?></h2></th>
552 </tr>
553 </thead>
554 <tbody>
555 <?php
556 foreach ( $post_type_counts as $ptype ) {
557 ?>
558 <tr>
559 <td><?php echo esc_html( $ptype['type'] ); ?></td>
560 <td class="help">&nbsp;</td>
561 <td><?php echo absint( $ptype['count'] ); ?></td>
562 </tr>
563 <?php
564 }
565 ?>
566 </tbody>
567 </table>
568 <?php endif; ?>
569 <table class="wc_status_table widefat" cellspacing="0">
570 <thead>
571 <tr>
572 <th colspan="3" data-export-label="Security"><h2><?php esc_html_e( 'Security', 'woocommerce' ); ?></h2></th>
573 </tr>
574 </thead>
575 <tbody>
576 <tr>
577 <td data-export-label="Secure connection (HTTPS)"><?php esc_html_e( 'Secure connection (HTTPS)', 'woocommerce' ); ?>:</td>
578 <td class="help"><?php echo wc_help_tip( esc_html__( 'Is the connection to your store secure?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
579 <td>
580 <?php if ( $security['secure_connection'] ) : ?>
581 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
582 <?php else : ?>
583 <mark class="error"><span class="dashicons dashicons-warning"></span>
584 <?php
585 /* Translators: %s: docs link. */
586 echo wp_kses_post( sprintf( __( 'Your store is not using HTTPS. <a href="%s" target="_blank">Learn more about HTTPS and SSL Certificates</a>.', 'woocommerce' ), 'https://woocommerce.com/document/ssl-and-https/' ) );
587 ?>
588 </mark>
589 <?php endif; ?>
590 </td>
591 </tr>
592 <tr>
593 <td data-export-label="Hide errors from visitors"><?php esc_html_e( 'Hide errors from visitors', 'woocommerce' ); ?></td>
594 <td class="help"><?php echo wc_help_tip( esc_html__( 'Error messages can contain sensitive information about your store environment. These should be hidden from untrusted visitors.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
595 <td>
596 <?php if ( $security['hide_errors'] ) : ?>
597 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
598 <?php else : ?>
599 <mark class="error"><span class="dashicons dashicons-warning"></span><?php esc_html_e( 'Error messages should not be shown to visitors.', 'woocommerce' ); ?></mark>
600 <?php endif; ?>
601 </td>
602 </tr>
603 </tbody>
604 </table>
605 <table class="wc_status_table widefat" cellspacing="0">
606 <thead>
607 <tr>
608 <th colspan="3" data-export-label="Active Plugins (<?php echo esc_attr( $active_plugins_count ); ?>)"><h2><?php esc_html_e( 'Active plugins', 'woocommerce' ); ?> (<?php echo esc_attr( $active_plugins_count ); ?>)</h2></th>
609 </tr>
610 </thead>
611 <tbody>
612 <?php self::output_plugins_info( $active_plugins, $untested_plugins ); ?>
613 </tbody>
614 </table>
615 <table class="wc_status_table widefat" cellspacing="0">
616 <thead>
617 <tr>
618 <th colspan="3" data-export-label="Inactive Plugins (<?php echo esc_attr( $inactive_plugins_count ); ?>)"><h2><?php esc_html_e( 'Inactive plugins', 'woocommerce' ); ?> (<?php echo esc_attr( $inactive_plugins_count ); ?>)</h2></th>
619 </tr>
620 </thead>
621 <tbody>
622 <?php self::output_plugins_info( $inactive_plugins, $untested_plugins ); ?>
623 </tbody>
624 </table>
625 <?php
626 $dropins_count = is_countable( $dropins_mu_plugins['dropins'] ) ? count( $dropins_mu_plugins['dropins'] ) : 0;
627 if ( 0 < $dropins_count ) :
628 ?>
629 <table class="wc_status_table widefat" cellspacing="0">
630 <thead>
631 <tr>
632 <th colspan="3" data-export-label="Dropin Plugins (<?php $dropins_count; ?>)"><h2><?php esc_html_e( 'Dropin Plugins', 'woocommerce' ); ?> (<?php $dropins_count; ?>)</h2></th>
633 </tr>
634 </thead>
635 <tbody>
636 <?php
637 foreach ( $dropins_mu_plugins['dropins'] as $dropin ) {
638 ?>
639 <tr>
640 <td><?php echo wp_kses_post( $dropin['plugin'] ); ?></td>
641 <td class="help">&nbsp;</td>
642 <td><?php echo wp_kses_post( $dropin['name'] ); ?>
643 </tr>
644 <?php
645 }
646 ?>
647 </tbody>
648 </table>
649 <?php
650 endif;
651
652 $mu_plugins_count = is_countable( $dropins_mu_plugins['mu_plugins'] ) ? count( $dropins_mu_plugins['mu_plugins'] ) : 0;
653 if ( 0 < $mu_plugins_count ) :
654 ?>
655 <table class="wc_status_table widefat" cellspacing="0">
656 <thead>
657 <tr>
658 <th colspan="3" data-export-label="Must Use Plugins (<?php echo esc_attr( $mu_plugins_count ); ?>)"><h2><?php esc_html_e( 'Must Use Plugins', 'woocommerce' ); ?> (<?php echo esc_attr( $mu_plugins_count ); ?>)</h2></th>
659 </tr>
660 </thead>
661 <tbody>
662 <?php
663 foreach ( $dropins_mu_plugins['mu_plugins'] as $mu_plugin ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
664 $plugin_name = esc_html( $mu_plugin['name'] );
665 if ( ! empty( $mu_plugin['url'] ) ) {
666 $plugin_name = '<a href="' . esc_url( $mu_plugin['url'] ) . '" aria-label="' . esc_attr__( 'Visit plugin homepage', 'woocommerce' ) . '" target="_blank">' . $plugin_name . '</a>';
667 }
668 ?>
669 <tr>
670 <td><?php echo wp_kses_post( $plugin_name ); ?></td>
671 <td class="help">&nbsp;</td>
672 <td>
673 <?php
674 /* translators: %s: plugin author */
675 printf( esc_html__( 'by %s', 'woocommerce' ), esc_html( $mu_plugin['author_name'] ) );
676 echo ' &ndash; ' . esc_html( $mu_plugin['version'] );
677 ?>
678 </tr>
679 <?php
680 }
681 ?>
682 </tbody>
683 </table>
684 <?php endif; ?>
685 <table class="wc_status_table widefat" cellspacing="0">
686 <thead>
687 <tr>
688 <th colspan="3" data-export-label="Settings"><h2><?php esc_html_e( 'Settings', 'woocommerce' ); ?></h2></th>
689 </tr>
690 </thead>
691 <tbody>
692 <tr>
693 <td data-export-label="Force SSL"><?php esc_html_e( 'Force SSL', 'woocommerce' ); ?>:</td>
694 <td class="help"><?php echo wc_help_tip( esc_html__( 'Does your site force a SSL Certificate for transactions?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
695 <td><?php echo $settings['force_ssl'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
696 </tr>
697 <tr>
698 <td data-export-label="Currency"><?php esc_html_e( 'Currency', 'woocommerce' ); ?></td>
699 <td class="help"><?php echo wc_help_tip( esc_html__( 'What currency prices are listed at in the catalog and which currency gateways will take payments in.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
700 <td><?php echo esc_html( $settings['currency'] ); ?> (<?php echo esc_html( $settings['currency_symbol'] ); ?>)</td>
701 </tr>
702 <tr>
703 <td data-export-label="Currency Position"><?php esc_html_e( 'Currency position', 'woocommerce' ); ?></td>
704 <td class="help"><?php echo wc_help_tip( esc_html__( 'The position of the currency symbol.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
705 <td><?php echo esc_html( $settings['currency_position'] ); ?></td>
706 </tr>
707 <tr>
708 <td data-export-label="Thousand Separator"><?php esc_html_e( 'Thousand separator', 'woocommerce' ); ?></td>
709 <td class="help"><?php echo wc_help_tip( esc_html__( 'The thousand separator of displayed prices.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
710 <td><?php echo esc_html( $settings['thousand_separator'] ); ?></td>
711 </tr>
712 <tr>
713 <td data-export-label="Decimal Separator"><?php esc_html_e( 'Decimal separator', 'woocommerce' ); ?></td>
714 <td class="help"><?php echo wc_help_tip( esc_html__( 'The decimal separator of displayed prices.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
715 <td><?php echo esc_html( $settings['decimal_separator'] ); ?></td>
716 </tr>
717 <tr>
718 <td data-export-label="Number of Decimals"><?php esc_html_e( 'Number of decimals', 'woocommerce' ); ?></td>
719 <td class="help"><?php echo wc_help_tip( esc_html__( 'The number of decimal points shown in displayed prices.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
720 <td><?php echo esc_html( $settings['number_of_decimals'] ); ?></td>
721 </tr>
722 <tr>
723 <td data-export-label="Taxonomies: Product Types"><?php esc_html_e( 'Taxonomies: Product types', 'woocommerce' ); ?></td>
724 <td class="help"><?php echo wc_help_tip( esc_html__( 'A list of taxonomy terms that can be used in regard to order/product statuses.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
725 <td>
726 <?php
727 $display_terms = array();
728 foreach ( $settings['taxonomies'] as $slug => $name ) {
729 $display_terms[] = strtolower( $name ) . ' (' . $slug . ')';
730 }
731 echo implode( ', ', array_map( 'esc_html', $display_terms ) );
732 ?>
733 </td>
734 </tr>
735 <tr>
736 <td data-export-label="Taxonomies: Product Visibility"><?php esc_html_e( 'Taxonomies: Product visibility', 'woocommerce' ); ?></td>
737 <td class="help"><?php echo wc_help_tip( esc_html__( 'A list of taxonomy terms used for product visibility.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
738 <td>
739 <?php
740 $display_terms = array();
741 foreach ( $settings['product_visibility_terms'] as $slug => $name ) {
742 $display_terms[] = strtolower( $name ) . ' (' . $slug . ')';
743 }
744 echo implode( ', ', array_map( 'esc_html', $display_terms ) );
745 ?>
746 </td>
747 </tr>
748 <tr>
749 <td data-export-label="Connected to WooCommerce.com"><?php esc_html_e( 'Connected to WooCommerce.com', 'woocommerce' ); ?>:</td>
750 <td class="help"><?php echo wc_help_tip( esc_html__( 'Is your site connected to WooCommerce.com?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
751 <td><?php echo 'yes' === $settings['woocommerce_com_connected'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
752 </tr>
753 <tr>
754 <td data-export-label="Enforce Approved Product Download Directories"><?php esc_html_e( 'Enforce Approved Product Download Directories', 'woocommerce' ); ?>:</td>
755 <td class="help"><?php echo wc_help_tip( esc_html__( 'Is your site enforcing the use of Approved Product Download Directories?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
756 <td><?php echo $settings['enforce_approved_download_dirs'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
757 </tr>
758
759 <tr>
760 <td data-export-label="HPOS feature enabled"><?php esc_html_e( 'HPOS enabled:', 'woocommerce' ); ?></td>
761 <td class="help"><?php echo wc_help_tip( esc_html__( 'Is HPOS enabled?', 'woocommerce' ) ); ?></td>
762 <td><?php echo $settings['HPOS_enabled'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
763 </tr>
764 <tr>
765 <td data-export-label="Order datastore"><?php esc_html_e( 'Order datastore:', 'woocommerce' ); ?></td>
766 <td class="help"><?php echo wc_help_tip( esc_html__( 'Datastore currently in use for orders.', 'woocommerce' ) ); ?></td>
767 <td><?php echo esc_html( $settings['order_datastore'] ); ?></td>
768 </tr>
769 <tr>
770 <td data-export-label="HPOS data sync enabled"><?php esc_html_e( 'HPOS data sync enabled:', 'woocommerce' ); ?></td>
771 <td class="help"><?php echo wc_help_tip( esc_html__( 'Is data sync enabled for HPOS?', 'woocommerce' ) ); ?></td>
772 <td><?php echo $settings['HPOS_sync_enabled'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
773 </tr>
774
775 <tr>
776 <td data-export-label="Enabled Features"><?php esc_html_e( 'Enabled features:', 'woocommerce' ); ?></td>
777 <td class="help"><?php echo wc_help_tip( esc_html__( 'Features that are currently enabled.', 'woocommerce' ) ); ?></td>
778 <td><?php echo esc_html( implode( ', ', $settings['enabled_features'] ) ); ?></td>
779 </tr>
780
781 </tbody>
782 </table>
783 <table class="wc_status_table widefat" cellspacing="0">
784 <thead>
785 <tr>
786 <th colspan="3" data-export-label="Logging"><h2><?php esc_html_e( 'Logging', 'woocommerce' ); ?></h2></th>
787 </tr>
788 </thead>
789 <tbody>
790 <tr>
791 <td data-export-label="Enabled"><?php esc_html_e( 'Enabled', 'woocommerce' ); ?></td>
792 <td class="help"><?php echo wc_help_tip( esc_html__( 'Is logging enabled?', 'woocommerce' ) ); ?></td>
793 <td><?php echo $logging['logging_enabled'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
794 </tr>
795 <tr>
796 <td data-export-label="Handler"><?php esc_html_e( 'Handler', 'woocommerce' ); ?></td>
797 <td class="help"><?php echo wc_help_tip( esc_html__( 'How log entries are being stored.', 'woocommerce' ) ); ?></td>
798 <td><?php echo esc_html( $logging['default_handler'] ); ?></td>
799 </tr>
800 <tr>
801 <td data-export-label="Retention period"><?php esc_html_e( 'Retention period', 'woocommerce' ); ?></td>
802 <td class="help"><?php echo wc_help_tip( esc_html__( 'How many days log entries will be kept before being auto-deleted.', 'woocommerce' ) ); ?></td>
803 <td>
804 <?php
805 printf(
806 esc_html(
807 // translators: %s is a number of days.
808 _n(
809 '%s day',
810 '%s days',
811 $logging['retention_period_days'],
812 'woocommerce'
813 )
814 ),
815 esc_html( number_format_i18n( $logging['retention_period_days'] ) )
816 );
817 ?>
818 </td>
819 </tr>
820 <tr>
821 <td data-export-label="Level threshold"><?php esc_html_e( 'Level threshold', 'woocommerce' ); ?></td>
822 <td class="help"><?php echo wc_help_tip( esc_html__( 'The minimum severity level of logs that will be stored.', 'woocommerce' ) ); ?></td>
823 <td><?php echo $logging['level_threshold'] ? esc_html( $logging['level_threshold'] ) : '<mark class="no">&ndash;</mark>'; ?></td>
824 </tr>
825 <tr>
826 <td data-export-label="Log directory size"><?php esc_html_e( 'Log directory size', 'woocommerce' ); ?></td>
827 <td class="help"><?php echo wc_help_tip( esc_html__( 'The total size of the files in the log directory.', 'woocommerce' ) ); ?></td>
828 <td><?php echo esc_html( $logging['log_directory_size'] ); ?></td>
829 </tr>
830 </tbody>
831 </table>
832 <table class="wc_status_table widefat" cellspacing="0">
833 <thead>
834 <tr>
835 <th colspan="3" data-export-label="WC Pages"><h2><?php esc_html_e( 'WooCommerce pages', 'woocommerce' ); ?></h2></th>
836 </tr>
837 </thead>
838 <tbody>
839 <?php
840 $alt = 1;
841 foreach ( $wp_pages as $_page ) {
842 $found_error = false;
843
844 if ( $_page['page_id'] ) {
845 /* Translators: %s: page name. */
846 $page_name = '<a href="' . get_edit_post_link( $_page['page_id'] ) . '" aria-label="' . sprintf( esc_html__( 'Edit %s page', 'woocommerce' ), esc_html( $_page['page_name'] ) ) . '">' . esc_html( $_page['page_name'] ) . '</a>';
847 } else {
848 $page_name = esc_html( $_page['page_name'] );
849 }
850
851 echo '<tr><td data-export-label="' . esc_attr( $page_name ) . '">' . wp_kses_post( $page_name ) . ':</td>';
852 /* Translators: %s: page name. */
853 echo '<td class="help">' . wc_help_tip( sprintf( esc_html__( 'The URL of your %s page (along with the Page ID).', 'woocommerce' ), $page_name ) ) . '</td><td>';
854
855 // Page ID check.
856 if ( ! $_page['page_set'] ) {
857 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Page not set', 'woocommerce' ) . '</mark>';
858 $found_error = true;
859 } elseif ( ! $_page['page_exists'] ) {
860 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Page ID is set, but the page does not exist', 'woocommerce' ) . '</mark>';
861 $found_error = true;
862 } elseif ( ! $_page['page_visible'] ) {
863 /* Translators: %s: docs link. */
864 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . wp_kses_post( sprintf( __( 'Page visibility should be <a href="%s" target="_blank">public</a>', 'woocommerce' ), 'https://wordpress.org/support/article/content-visibility/' ) ) . '</mark>';
865 $found_error = true;
866 } elseif ( $_page['shortcode_required'] || $_page['block_required'] ) {
867 // Shortcode and block check.
868 if ( ! $_page['shortcode_present'] && ! $_page['block_present'] ) {
869 /* Translators: %1$s: shortcode text, %2$s: block slug. */
870 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . ( $_page['block_required'] ? sprintf( esc_html__( 'Page does not contain the %1$s shortcode or the %2$s block.', 'woocommerce' ), esc_html( $_page['shortcode'] ), esc_html( $_page['block'] ) ) : sprintf( esc_html__( 'Page does not contain the %s shortcode.', 'woocommerce' ), esc_html( $_page['shortcode'] ) ) ) . '</mark>'; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */
871 $found_error = true;
872 }
873
874 // Warn merchants if both the shortcode and block are present, which will be a confusing shopper experience.
875 if ( $_page['shortcode_present'] && $_page['block_present'] ) {
876 /* Translators: %1$s: shortcode text, %2$s: block slug. */
877 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( 'Page contains both the %1$s shortcode and the %2$s block.', 'woocommerce' ), esc_html( $_page['shortcode'] ), esc_html( $_page['block'] ) ) . '</mark>'; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */
878 $found_error = true;
879 }
880 }
881
882 if ( ! $found_error ) {
883
884 $additional_info = '';
885
886 if ( ! empty( $_page['shortcode'] ) || ! empty( $_page['block'] ) ) {
887 // We check first if, in a blocks theme, the template content does not load the page content.
888 if ( CartCheckoutUtils::is_overridden_by_custom_template_content( $_page['block'] ) ) {
889 $additional_info = __( "This page's content is overridden by custom template content", 'woocommerce' );
890 } elseif ( $_page['shortcode_present'] ) {
891 // Always display the shortcode with square brackets for consistency.
892 $shortcode_display = $_page['shortcode'];
893 if ( $shortcode_display && '[' !== $shortcode_display[0] ) {
894 $shortcode_display = '[' . $shortcode_display . ']';
895 }
896 /* translators: %1$s: shortcode text. */
897 $additional_info = sprintf( __( 'Contains the <strong>%1$s</strong> shortcode', 'woocommerce' ), esc_html( $shortcode_display ) );
898 } elseif ( $_page['block_present'] ) {
899 /* Translators: %1$s: block slug. */
900 $additional_info = sprintf( __( 'Contains the <strong>%1$s</strong> block', 'woocommerce' ), esc_html( $_page['block'] ) );
901 }
902
903 if ( ! empty( $additional_info ) ) {
904 $additional_info = '<mark class="no"> - <span class="dashicons dashicons-info"></span> ' . $additional_info . '</mark>';
905 }
906 }
907
908 echo '<mark class="yes">#' . absint( $_page['page_id'] ) . ' - ' . esc_html( str_replace( home_url(), '', get_permalink( $_page['page_id'] ) ) ) . '</mark>' . $additional_info; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */
909 }
910
911 echo '</td></tr>';
912 }
913 ?>
914 </tbody>
915 </table>
916 <table class="wc_status_table widefat" cellspacing="0">
917 <thead>
918 <tr>
919 <th colspan="3" data-export-label="Theme"><h2><?php esc_html_e( 'Theme', 'woocommerce' ); ?></h2></th>
920 </tr>
921 </thead>
922 <tbody>
923 <tr>
924 <td data-export-label="Name"><?php esc_html_e( 'Name', 'woocommerce' ); ?>:</td>
925 <td class="help"><?php echo wc_help_tip( esc_html__( 'The name of the current active theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
926 <td><?php echo esc_html( $theme['name'] ); ?></td>
927 </tr>
928 <tr>
929 <td data-export-label="Version"><?php esc_html_e( 'Version', 'woocommerce' ); ?>:</td>
930 <td class="help"><?php echo wc_help_tip( esc_html__( 'The installed version of the current active theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
931 <td>
932 <?php
933 if ( version_compare( $theme['version'], $theme['version_latest'], '<' ) ) {
934 /* translators: 1: current version. 2: latest version */
935 echo esc_html( sprintf( __( '%1$s (update to version %2$s is available)', 'woocommerce' ), $theme['version'], $theme['version_latest'] ) );
936 } else {
937 echo esc_html( $theme['version'] );
938 }
939 ?>
940 </td>
941 </tr>
942 <tr>
943 <td data-export-label="Author URL"><?php esc_html_e( 'Author URL', 'woocommerce' ); ?>:</td>
944 <td class="help"><?php echo wc_help_tip( esc_html__( 'The theme developers URL.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
945 <td><?php echo esc_html( $theme['author_url'] ); ?></td>
946 </tr>
947 <tr>
948 <td data-export-label="Child Theme"><?php esc_html_e( 'Child theme', 'woocommerce' ); ?>:</td>
949 <td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether or not the current theme is a child theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
950 <td>
951 <?php
952 if ( $theme['is_child_theme'] ) {
953 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
954 } else {
955 /* Translators: %s docs link. */
956 echo '<span class="dashicons dashicons-no-alt"></span> &ndash; ' . wp_kses_post( 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://developer.wordpress.org/themes/advanced-topics/child-themes/' ) );
957 }
958 ?>
959 </td>
960 </tr>
961 <?php if ( $theme['is_child_theme'] ) : ?>
962 <tr>
963 <td data-export-label="Parent Theme Name"><?php esc_html_e( 'Parent theme name', 'woocommerce' ); ?>:</td>
964 <td class="help"><?php echo wc_help_tip( esc_html__( 'The name of the parent theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
965 <td><?php echo esc_html( $theme['parent_name'] ); ?></td>
966 </tr>
967 <tr>
968 <td data-export-label="Parent Theme Version"><?php esc_html_e( 'Parent theme version', 'woocommerce' ); ?>:</td>
969 <td class="help"><?php echo wc_help_tip( esc_html__( 'The installed version of the parent theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
970 <td>
971 <?php
972 echo esc_html( $theme['parent_version'] );
973 if ( version_compare( $theme['parent_version'], $theme['parent_version_latest'], '<' ) ) {
974 /* translators: %s: parent theme latest version */
975 echo ' &ndash; <strong style="color:red;">' . sprintf( esc_html__( '%s is available', 'woocommerce' ), esc_html( $theme['parent_version_latest'] ) ) . '</strong>';
976 }
977 ?>
978 </td>
979 </tr>
980 <tr>
981 <td data-export-label="Parent Theme Author URL"><?php esc_html_e( 'Parent theme author URL', 'woocommerce' ); ?>:</td>
982 <td class="help"><?php echo wc_help_tip( esc_html__( 'The parent theme developers URL.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
983 <td><?php echo esc_html( $theme['parent_author_url'] ); ?></td>
984 </tr>
985 <?php endif ?>
986 <?php if ( isset( $theme['is_block_theme'] ) ) : ?>
987 <tr>
988 <td data-export-label="Theme type"><?php esc_html_e( 'Theme type', 'woocommerce' ); ?>:</td>
989 <td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether the current active theme is a block theme or a classic theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
990 <td>
991 <?php
992 if ( $theme['is_block_theme'] ) {
993 esc_html_e( 'Block theme', 'woocommerce' );
994 } else {
995 esc_html_e( 'Classic theme', 'woocommerce' );
996 }
997 ?>
998 </td>
999 </tr>
1000 <?php endif ?>
1001 <tr>
1002 <td data-export-label="WooCommerce Support"><?php esc_html_e( 'WooCommerce support', 'woocommerce' ); ?>:</td>
1003 <td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether or not the current active theme declares WooCommerce support.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
1004 <td>
1005 <?php
1006 if ( ! $theme['has_woocommerce_support'] ) {
1007 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Not declared', 'woocommerce' ) . '</mark>';
1008 } else {
1009 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
1010 }
1011 ?>
1012 </td>
1013 </tr>
1014 </tbody>
1015 </table>
1016 <table class="wc_status_table widefat" id="status-table-templates" cellspacing="0">
1017 <thead>
1018 <tr>
1019 <th colspan="3" data-export-label="Templates"><h2><?php esc_html_e( 'Templates', 'woocommerce' ); ?><?php echo wc_help_tip( esc_html__( 'This section shows any files that are overriding the default WooCommerce template pages.', 'woocommerce' ) ); ?></h2></th>
1020 </tr>
1021 </thead>
1022 <tbody>
1023 <?php if ( $theme['has_woocommerce_file'] ) : ?>
1024 <tr>
1025 <td data-export-label="Archive Template"><?php esc_html_e( 'Archive template', 'woocommerce' ); ?>:</td>
1026 <td class="help">&nbsp;</td>
1027 <td><?php esc_html_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>
1028 </tr>
1029 <?php endif ?>
1030 <?php if ( ! empty( $theme['overrides'] ) ) : ?>
1031 <?php foreach ( $theme['overrides'] as $i => $override ) : ?>
1032 <tr>
1033 <td data-export-label="Override">
1034 <?php if ( 0 === $i ) : ?>
1035 <?php esc_html_e( 'Overrides', 'woocommerce' ); ?>:
1036 <?php endif; ?>
1037 </td>
1038 <td class="help">&nbsp;</td>
1039 <?php
1040 echo '<td>';
1041 echo '<code>' . esc_html( $override['file'] ) . '</code>';
1042 if ( $override['core_version'] && '' === $override['version'] ) {
1043 echo ' <br><mark class="error"><span class="dashicons dashicons-warning"></span> ';
1044 printf(
1045 /* Translators: %s: Core version. */
1046 esc_html__( 'Version header is missing. The core version is %s', 'woocommerce' ),
1047 '<strong>' . esc_html( $override['core_version'] ) . '</strong>'
1048 );
1049 echo '</mark>';
1050 } elseif ( $override['core_version'] && version_compare( $override['version'], $override['core_version'], '<' ) ) {
1051 echo ' <br><mark class="error"><span class="dashicons dashicons-warning"></span> ';
1052 printf(
1053 /* Translators: %1$s: Template version, %2$s: Core version. */
1054 esc_html__( 'Version %1$s is out of date. The core version is %2$s', 'woocommerce' ),
1055 '<strong>' . esc_html( $override['version'] ) . '</strong>',
1056 '<strong>' . esc_html( $override['core_version'] ) . '</strong>'
1057 );
1058 echo '</mark>';
1059 }
1060 echo '</td>';
1061 ?>
1062 </tr>
1063 <?php endforeach; ?>
1064 <?php else : ?>
1065 <tr>
1066 <td data-export-label="Overrides"><?php esc_html_e( 'Overrides', 'woocommerce' ); ?>:</td>
1067 <td class="help">&nbsp;</td>
1068 <td>&ndash;</td>
1069 </tr>
1070 <?php endif; ?>
1071 </tbody>
1072 <?php if ( true === $theme['has_outdated_templates'] ) : ?>
1073 <tfoot>
1074 <tr>
1075 <td><?php esc_html_e( 'Outdated templates', 'woocommerce' ); ?>:</td>
1076 <td class="help">&nbsp;</td>
1077 <td>
1078 <mark class="error">
1079 <span class="dashicons dashicons-warning"></span>
1080 </mark>
1081 <span class="private">
1082 <a href="https://developer.woocommerce.com/docs/theming/theme-development/fixing-outdated-woocommerce-templates/" target="_blank">
1083 <?php esc_html_e( 'Learn how to update', 'woocommerce' ); ?>
1084 </a> |
1085 <mark class="info">
1086 <span class="dashicons dashicons-info"></span>
1087 </mark>
1088 <a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-status&tab=tools' ) ); ?>">
1089 <?php esc_html_e( 'Clear system status theme info cache', 'woocommerce' ); ?>
1090 </a>
1091 </span>
1092 </td>
1093 </tr>
1094 </tfoot>
1095 <?php endif; ?>
1096 </table>
1097
1098 <?php
1099 /**
1100 * Action fired when the WooCommerce system status report is rendered.
1101 *
1102 * @since 2.4.0 Introduced hook.
1103 * @since 9.8.0 Made SSR report data available to callbacks.
1104 *
1105 * @param array|WP_Error $report Report data.
1106 */
1107 do_action( 'woocommerce_system_status_report', $report );
1108 ?>
1109
1110 <table class="wc_status_table widefat" cellspacing="0">
1111 <thead>
1112 <tr>
1113 <th colspan="3" data-export-label="Status report information"><h2><?php esc_html_e( 'Status report information', 'woocommerce' ); ?><?php echo wc_help_tip( esc_html__( 'This section shows information about this status report.', 'woocommerce' ) ); ?></h2></th>
1114 </tr>
1115 </thead>
1116 <tbody>
1117 <tr>
1118 <td data-export-label="Generated at"><?php esc_html_e( 'Generated at', 'woocommerce' ); ?>:</td>
1119 <td class="help">&nbsp;</td>
1120 <td><?php echo esc_html( current_time( 'Y-m-d H:i:s P' ) ); ?></td>
1121
1122 </tr>
1123 </tbody>
1124 </table>
1125