get( RestApiUtil::class )->get_endpoint_data( '/wc/v3/system_status' ); $environment = $report['environment']; $database = $report['database']; $post_type_counts = isset( $report['post_type_counts'] ) ? $report['post_type_counts'] : array(); $active_plugins = $report['active_plugins']; $inactive_plugins = $report['inactive_plugins']; $dropins_mu_plugins = $report['dropins_mu_plugins']; $theme = $report['theme']; $security = $report['security']; $settings = $report['settings']; $logging = $report['logging']; $wp_pages = $report['pages']; $plugin_updates = new WC_Plugin_Updates(); $untested_plugins = $plugin_updates->get_untested_plugins( WC()->version, Constants::get_constant( 'WC_SSR_PLUGIN_UPDATE_RELEASE_VERSION_TYPE' ) ); $active_plugins_count = is_countable( $active_plugins ) ? count( $active_plugins ) : 0; $inactive_plugins_count = is_countable( $inactive_plugins ) ? count( $inactive_plugins ) : 0; // Include necessary WordPress file to use get_plugin_data(). if ( ! function_exists( 'get_plugin_data' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } // Define the path to the main WooCommerce plugin file using the correct constant. $plugin_path = WP_PLUGIN_DIR . '/woocommerce/woocommerce.php'; // Initialize the WooCommerce version variable. $wc_version = ''; // Check if the plugin file exists before trying to access it. if ( file_exists( $plugin_path ) ) { $plugin_data = get_plugin_data( $plugin_path ); $wc_version = $plugin_data['Version'] ?? ''; // Use null coalescing operator to handle undefined index. } ?>
: | ||
: | ||
: | ||
: |
api ) ) {
echo ' ' . esc_html__( 'The Legacy REST API plugin is not installed on this site.', 'woocommerce' ) . '';
} else {
$plugin_path = wc_get_container()->get( \Automattic\WooCommerce\Utilities\PluginUtil::class )->get_wp_plugin_id( 'woocommerce-legacy-rest-api' );
$version = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_path )['Version'] ?? '';
echo ' ' . esc_html( $version ) . ' ' . esc_html( wc()->api->get_rest_api_package_path() ) . ' ';
}
?>
|
|
: |
latest_version();
$path = ActionScheduler::plugin_path( '' ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
} else {
$version = null;
}
if ( ! is_null( $version ) ) {
echo ' ' . esc_html( $version ) . ' ' . esc_html( $path ) . ' ';
} else {
echo ' ' . esc_html__( 'Unable to detect the Action Scheduler package.', 'woocommerce' ) . '';
}
?>
|
|
: |
' . esc_html( $environment['log_directory'] ) . ' ';
} else {
printf(
' %s',
sprintf(
// Translators: %s: Log directory path.
esc_html__( 'To allow logging, make %s writable.', 'woocommerce' ),
'' . esc_html( $environment['log_directory'] ) . ' '
)
);
}
?>
|
|
: | ' . 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 ) ) . ''; } else { echo '' . esc_html( $environment['wp_version'] ) . ''; } ?> | |
: | ' : '–'; ?> | |
: | ' . 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'] ) ), '' . esc_html__( 'Increasing memory allocated to PHP', 'woocommerce' ) . '' ) . ''; } else { echo '' . esc_html( size_format( $environment['wp_memory_limit'] ) ) . ''; } ?> | |
: | – | |
: | – | |
: | ||
: | – |
: | ||
: | ' . esc_html( $environment['php_version'] ) . ''; ?> | |
: | ||
: | ||
: | ||
: | ||
: | ' : '–'; ?> | |
: | ' . sprintf( esc_html__( '%1$s - We recommend a minimum MySQL version of 5.6. See: %2$s', 'woocommerce' ), esc_html( $environment['mysql_version_string'] ), '' . esc_html__( 'WordPress requirements', 'woocommerce' ) . '' ) . ''; } else { echo '' . esc_html( $environment['mysql_version_string'] ) . ''; } ?> | |
: | ||
: | ' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'woocommerce' ), esc_html( $environment['default_timezone'] ) ) . ''; } else { echo ''; } ?> | |
: | '; } else { echo ' ' . 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' ) . ''; } ?> | |
: | '; } else { /* Translators: %s classname and link. */ echo ' ' . sprintf( esc_html__( 'Your server does not have the %s class enabled - some gateway plugins which use SOAP may not work as expected.', 'woocommerce' ), 'SoapClient' ) . ''; } ?> | |
: | '; } else { /* Translators: %s: classname and link. */ echo ' ' . 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' ), 'DOMDocument' ) . ''; } ?> | |
: | '; } else { /* Translators: %s: classname and link. */ echo ' ' . sprintf( esc_html__( 'Your server does not support the %s function - this is required to use the GeoIP database from MaxMind.', 'woocommerce' ), 'gzopen' ) . ''; } ?> | |
: | '; } else { /* Translators: %s: classname and link. */ echo ' ' . 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' ), 'mbstring' ) . ''; } ?> | |
: | '; } else { /* Translators: %s: function name. */ echo ' ' . sprintf( esc_html__( '%s failed. Contact your hosting provider.', 'woocommerce' ), 'wp_remote_post()' ) . ' ' . esc_html( $environment['remote_post_response'] ) . ''; } ?> | |
: | '; } else { /* Translators: %s: function name. */ echo ' ' . sprintf( esc_html__( '%s failed. Contact your hosting provider.', 'woocommerce' ), 'wp_remote_get()' ) . ' ' . esc_html( $environment['remote_get_response'] ) . ''; } ?> | |
: |
|
||
---|---|---|
: | ||
20 ) { /* Translators: %1$s: Database prefix, %2$s: Docs link. */ echo ' ' . sprintf( esc_html__( '%1$s - We recommend using a prefix with less than 20 characters. See: %2$s', 'woocommerce' ), esc_html( $database['database_prefix'] ), '' . esc_html__( 'How to update your database table prefix', 'woocommerce' ) . '' ) . ''; } else { echo '' . esc_html( $database['database_prefix'] ) . ''; } ?> | ||
' . esc_html__( 'Table does not exist', 'woocommerce' ) . ''; } else { /* Translators: %1$f: Table size, %2$f: Index size, %3$s Engine. */ 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'] ) ); } ?> | ||
: | Learn more about HTTPS and SSL Certificates.', 'woocommerce' ), 'https://woocommerce.com/document/ssl-and-https/' ) ); ?> | |
() |
---|
() |
---|
() |
||
---|---|---|
() |
||
---|---|---|
: | ' : '–'; ?> | |
: | ' : '–'; ?> | |
() | ||
$name ) { $display_terms[] = strtolower( $name ) . ' (' . $slug . ')'; } echo implode( ', ', array_map( 'esc_html', $display_terms ) ); ?> | ||
$name ) { $display_terms[] = strtolower( $name ) . ' (' . $slug . ')'; } echo implode( ', ', array_map( 'esc_html', $display_terms ) ); ?> | ||
: | ' : '–'; ?> | |
: | ' : '–'; ?> | |
' : '–'; ?> | ||
' : '–'; ?> |
' : '–'; ?> | ||
–'; ?> | ||
' . wp_kses_post( $page_name ) . ': | '; /* Translators: %s: page name. */ echo '' . wc_help_tip( sprintf( esc_html__( 'The URL of your %s page (along with the Page ID).', 'woocommerce' ), $page_name ) ) . ' | '; // Page ID check. if ( ! $_page['page_set'] ) { echo ' ' . esc_html__( 'Page not set', 'woocommerce' ) . ''; $found_error = true; } elseif ( ! $_page['page_exists'] ) { echo ' ' . esc_html__( 'Page ID is set, but the page does not exist', 'woocommerce' ) . ''; $found_error = true; } elseif ( ! $_page['page_visible'] ) { /* Translators: %s: docs link. */ echo ' ' . wp_kses_post( sprintf( __( 'Page visibility should be public', 'woocommerce' ), 'https://wordpress.org/support/article/content-visibility/' ) ) . ''; $found_error = true; } elseif ( $_page['shortcode_required'] || $_page['block_required'] ) { // Shortcode and block check. if ( ! $_page['shortcode_present'] && ! $_page['block_present'] ) { /* Translators: %1$s: shortcode text, %2$s: block slug. */ echo ' ' . ( $_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'] ) ) ) . ''; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ $found_error = true; } // Warn merchants if both the shortcode and block are present, which will be a confusing shopper experience. if ( $_page['shortcode_present'] && $_page['block_present'] ) { /* Translators: %1$s: shortcode text, %2$s: block slug. */ echo ' ' . sprintf( esc_html__( 'Page contains both the %1$s shortcode and the %2$s block.', 'woocommerce' ), esc_html( $_page['shortcode'] ), esc_html( $_page['block'] ) ) . ''; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ $found_error = true; } } if ( ! $found_error ) { $additional_info = ''; // We only state the used type on the Checkout and the Cart page. if ( in_array( $_page['block'], array( 'woocommerce/checkout', 'woocommerce/cart' ), true ) ) { // We check first if, in a blocks theme, the template content does not load the page content. if ( CartCheckoutUtils::is_overriden_by_custom_template_content( $_page['block'] ) ) { $additional_info = __( "This page's content is overridden by custom template content", 'woocommerce' ); } elseif ( $_page['shortcode_present'] ) { /* Translators: %1$s: shortcode text. */ $additional_info = sprintf( __( 'Contains the %1$s shortcode', 'woocommerce' ), esc_html( $_page['shortcode'] ) ); } elseif ( $_page['block_present'] ) { /* Translators: %1$s: block slug. */ $additional_info = sprintf( __( 'Contains the %1$s block', 'woocommerce' ), esc_html( $_page['block'] ) ); } if ( ! empty( $additional_info ) ) { $additional_info = ' - ' . $additional_info . ''; } } echo '#' . absint( $_page['page_id'] ) . ' - ' . esc_html( str_replace( home_url(), '', get_permalink( $_page['page_id'] ) ) ) . '' . $additional_info; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ } echo ' |
: | ||
: | ||
: | ||
: | '; } else { /* Translators: %s docs link. */ echo ' – ' . 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: How to create a child theme', 'woocommerce' ), 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) ); } ?> | |
: | ||
: | ' . sprintf( esc_html__( '%s is available', 'woocommerce' ), esc_html( $theme['parent_version_latest'] ) ) . ''; } ?> | |
: | ||
: | ' . esc_html__( 'Not declared', 'woocommerce' ) . ''; } else { echo ''; } ?> |
: |