Removed WooCommerce Admin SSR Version
Since there's no such thing as WooCommerce Admin anymore, we can remove it from the SSR.
This commit is contained in:
parent
3dd60322d5
commit
80c3858aa6
|
@ -125,54 +125,6 @@ $untested_plugins = $plugin_updates->get_untested_plugins( WC()->version, Cons
|
|||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-export-label="WC Admin Version"><?php esc_html_e( 'WooCommerce Admin package', 'woocommerce' ); ?>:</td>
|
||||
<td class="help"><?php echo wc_help_tip( esc_html__( 'The WooCommerce Admin package running on your site.', 'woocommerce' ) ); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$wc_admin_path = null;
|
||||
if ( defined( 'WC_ADMIN_VERSION_NUMBER' ) ) {
|
||||
// Plugin version of WC Admin.
|
||||
$version = WC_ADMIN_VERSION_NUMBER;
|
||||
$package_active = false;
|
||||
} elseif ( class_exists( '\Automattic\WooCommerce\Admin\Composer\Package' ) ) {
|
||||
if ( WC()->is_wc_admin_active() ) {
|
||||
// Fully active package version of WC Admin.
|
||||
$version = \Automattic\WooCommerce\Admin\Composer\Package::get_active_version();
|
||||
$package_active = \Automattic\WooCommerce\Admin\Composer\Package::is_package_active();
|
||||
} else {
|
||||
// with WP version < 5.3, package is present, but inactive.
|
||||
$version = sprintf(
|
||||
/* translators: %s: Version number of wc-admin package */
|
||||
__( 'Inactive %s', 'woocommerce' ),
|
||||
\Automattic\WooCommerce\Admin\Composer\Package::VERSION
|
||||
);
|
||||
$package_active = false;
|
||||
}
|
||||
$wc_admin_path = \Automattic\WooCommerce\Admin\Composer\Package::get_path();
|
||||
} else {
|
||||
$version = null;
|
||||
}
|
||||
|
||||
if ( ! is_null( $version ) ) {
|
||||
if ( ! isset( $wc_admin_path ) ) {
|
||||
if ( defined( 'WC_ADMIN_PLUGIN_FILE' ) ) {
|
||||
$wc_admin_path = dirname( WC_ADMIN_PLUGIN_FILE );
|
||||
} else {
|
||||
$wc_admin_path = __( 'Active Plugin', 'woocommerce' );
|
||||
}
|
||||
}
|
||||
if ( WC()->is_wc_admin_active() ) {
|
||||
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span> ' . esc_html( $version ) . ' <code class="private">' . esc_html( $wc_admin_path ) . '</code></mark> ';
|
||||
} else {
|
||||
echo '<span class="dashicons dashicons-no-alt"></span> ' . esc_html( $version ) . ' <code class="private">' . esc_html( $wc_admin_path ) . '</code> ';
|
||||
}
|
||||
} else {
|
||||
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Unable to detect the WC Admin package.', 'woocommerce' ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-export-label="Log Directory Writable"><?php esc_html_e( 'Log directory writable', 'woocommerce' ); ?>:</td>
|
||||
<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>
|
||||
|
|
Loading…
Reference in New Issue