Merge pull request #24536 from nikhil-webkul/patch-3

Add back post type count to system status report
This commit is contained in:
Vedanshu Jain 2019-10-02 14:47:48 +05:30 committed by GitHub
commit 7bb1a0babd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 0 deletions

View File

@ -12,6 +12,7 @@ global $wpdb;
$report = wc()->api->get_endpoint_data( '/wc/v3/system_status' );
$environment = $report['environment'];
$database = $report['database'];
$post_type_counts = $report['post_type_counts'];
$active_plugins = $report['active_plugins'];
$inactive_plugins = $report['inactive_plugins'];
$dropins_mu_plugins = $report['dropins_mu_plugins'];
@ -517,6 +518,26 @@ $untested_plugins = $plugin_updates->get_untested_plugins( WC()->version, 'min
<?php endif; ?>
</tbody>
</table>
<table class="wc_status_table widefat" cellspacing="0">
<thead>
<tr>
<th colspan="3" data-export-label="Post Type Counts"><h2><?php esc_html_e( 'Post Type Counts', 'woocommerce' ); ?></h2></th>
</tr>
</thead>
<tbody>
<?php
foreach ( $post_type_counts as $ptype ) {
?>
<tr>
<td><?php echo esc_html( $ptype['type'] ); ?></td>
<td class="help">&nbsp;</td>
<td><?php echo absint( $ptype['count'] ); ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<table class="wc_status_table widefat" cellspacing="0">
<thead>
<tr>