Merge pull request #11469 from corsonr/status_report_db_prefix

Add database prefix to status report
This commit is contained in:
Claudio Sanches 2016-07-20 17:09:50 -03:00 committed by GitHub
commit 56f4efc8e3
1 changed files with 12 additions and 0 deletions

View File

@ -346,6 +346,18 @@ global $wpdb;
<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( get_option( 'woocommerce_db_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( $wpdb->prefix ) > 20 ) {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( '%s - We recommend using a prefix with less than 20 characters. See: %s', 'woocommerce' ), esc_html( $wpdb->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( $wpdb->prefix ) . '</mark>';
}
?>
</td>
</tr>
<tr>
<?php
$tables = array(