PHPCS fixes for template form-pay.php

This commit is contained in:
Gerhard Potgieter 2017-11-07 11:50:15 +02:00
parent fdd9ff325b
commit 702c085ab9
1 changed files with 20 additions and 20 deletions

View File

@ -13,7 +13,7 @@
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.5.0
* @version 3.3.0
*/
if ( ! defined( 'ABSPATH' ) ) {
@ -26,23 +26,23 @@ if ( ! defined( 'ABSPATH' ) ) {
<table class="shop_table">
<thead>
<tr>
<th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
<th class="product-quantity"><?php _e( 'Qty', 'woocommerce' ); ?></th>
<th class="product-total"><?php _e( 'Totals', 'woocommerce' ); ?></th>
<th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
<th class="product-quantity"><?php esc_html_e( 'Qty', 'woocommerce' ); ?></th>
<th class="product-total"><?php esc_html_e( 'Totals', 'woocommerce' ); ?></th>
</tr>
</thead>
<tbody>
<?php if ( sizeof( $order->get_items() ) > 0 ) : ?>
<?php if ( count( $order->get_items() ) > 0 ) : ?>
<?php foreach ( $order->get_items() as $item_id => $item ) : ?>
<?php
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
continue;
}
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
continue;
}
?>
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">
<td class="product-name">
<?php
echo apply_filters( 'woocommerce_order_item_name', esc_html( $item->get_name() ), $item, false );
echo apply_filters( 'woocommerce_order_item_name', esc_html( $item->get_name() ), $item, false ); // @codingStandardsIgnoreLine
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order );
@ -51,8 +51,8 @@ if ( ! defined( 'ABSPATH' ) ) {
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order );
?>
</td>
<td class="product-quantity"><?php echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '&times; %s', esc_html( $item->get_quantity() ) ) . '</strong>', $item ); ?></td>
<td class="product-subtotal"><?php echo $order->get_formatted_line_subtotal( $item ); ?></td>
<td class="product-quantity"><?php echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '&times; %s', esc_html( $item->get_quantity() ) ) . '</strong>', $item ); ?></td><?php // @codingStandardsIgnoreLine ?>
<td class="product-subtotal"><?php echo $order->get_formatted_line_subtotal( $item ); ?></td><?php // @codingStandardsIgnoreLine ?>
</tr>
<?php endforeach; ?>
<?php endif; ?>
@ -61,8 +61,8 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php if ( $totals = $order->get_order_item_totals() ) : ?>
<?php foreach ( $totals as $total ) : ?>
<tr>
<th scope="row" colspan="2"><?php echo $total['label']; ?></th>
<td class="product-total"><?php echo $total['value']; ?></td>
<th scope="row" colspan="2"><?php echo $total['label']; ?></th><?php // @codingStandardsIgnoreLine ?>
<td class="product-total"><?php echo $total['value']; ?></td><?php // @codingStandardsIgnoreLine ?>
</tr>
<?php endforeach; ?>
<?php endif; ?>
@ -73,13 +73,13 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php if ( $order->needs_payment() ) : ?>
<ul class="wc_payment_methods payment_methods methods">
<?php
if ( ! empty( $available_gateways ) ) {
foreach ( $available_gateways as $gateway ) {
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
}
} else {
echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', __( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) ) . '</li>';
if ( ! empty( $available_gateways ) ) {
foreach ( $available_gateways as $gateway ) {
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
}
} else {
echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', __( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) ) . '</li>'; // @codingStandardsIgnoreLine
}
?>
</ul>
<?php endif; ?>
@ -90,7 +90,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php do_action( 'woocommerce_pay_order_before_submit' ); ?>
<?php echo apply_filters( 'woocommerce_pay_order_button_html', '<input type="submit" class="button alt" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '" />' ); ?>
<?php echo apply_filters( 'woocommerce_pay_order_button_html', '<input type="submit" class="button alt" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '" />' ); // @codingStandardsIgnoreLine ?>
<?php do_action( 'woocommerce_pay_order_after_submit' ); ?>