Fixed coding standards

This commit is contained in:
Claudio Sanches 2016-09-13 18:24:21 -03:00
parent 486449bf07
commit be029374ce
4 changed files with 6 additions and 5 deletions

View File

@ -36,8 +36,8 @@ $who_refunded = new WP_User( $refund->get_refunded_by() );
</div>
</td>
<?php if ( wc_tax_enabled() ) : ?>
<?php for ( $i = 0; $i < count( $order_taxes ); $i++ ) : ?>
<?php if ( wc_tax_enabled() ) : $total_taxes = count( $order_taxes ); ?>
<?php for ( $i = 0; $i < $total_taxes; $i++ ) : ?>
<td class="line_tax" width="1%"></td>
<?php endfor; ?>
<?php endif; ?>

View File

@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<p><strong><?php _e( 'Duration', 'woocommerce' ); ?>: </strong><?php echo esc_html( $log['duration'] ); ?></p>
<p><strong><?php _e( 'Headers', 'woocommerce' ); ?>:</strong></p>
<ul>
<?php foreach ( ( array ) $log['request_headers'] as $key => $value ) : ?>
<?php foreach ( (array) $log['request_headers'] as $key => $value ) : ?>
<li><strong><em><?php echo strtolower( esc_html( $key ) ); ?>: </em></strong><code><?php echo esc_html( $value ); ?></code></li>
<?php endforeach ?>
</ul>

View File

@ -563,7 +563,8 @@ $pages = $system_status->get_pages();
<td class="help">&nbsp;</td>
<td>
<?php
for ( $i = 0; $i < count( $theme['overrides'] ); $i++ ) {
$total_overrides = count( $theme['overrides'] );
for ( $i = 0; $i < $total_overrides; $i++ ) {
$override = $theme['overrides'][ $i ];
if ( $override['core_version'] && ( empty( $override['version'] ) || version_compare( $override['version'], $override['core_version'], '<' ) ) ) {
printf( __( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'woocommerce' ), $override['file'], $override['version'] ? $override['version'] : '-', $override['core_version'] );

View File

@ -556,7 +556,7 @@ class WC_CLI_Customer extends WC_CLI_Command {
if ( is_numeric( $id_email_or_login ) ) {
$user = get_user_by( 'id', $id_email_or_login );
} else if ( is_email( $id_email_or_login ) ) {
} elseif ( is_email( $id_email_or_login ) ) {
$user = get_user_by( 'email', $id_email_or_login );
} else {
$user = get_user_by( 'login', $id_email_or_login );