diff --git a/templates/myaccount/orders.php b/templates/myaccount/orders.php index f7270830f48..294608e233c 100644 --- a/templates/myaccount/orders.php +++ b/templates/myaccount/orders.php @@ -12,9 +12,9 @@ * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * - * @see https://docs.woocommerce.com/document/template-structure/ + * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates - * @version 3.2.0 + * @version 3.6.0 */ if ( ! defined( 'ABSPATH' ) ) { @@ -35,8 +35,9 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?> - orders as $customer_order ) : - $order = wc_get_order( $customer_order ); + orders as $customer_order ) { + $order = wc_get_order( $customer_order ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited $item_count = $order->get_item_count() - $order->get_item_count_refunded(); ?> @@ -47,7 +48,7 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?> - get_order_number(); ?> + get_order_number() ); ?> @@ -59,7 +60,7 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?> get_formatted_order_total(), $item_count ); + echo wp_kses_post( sprintf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count ) ); ?> @@ -67,7 +68,7 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?> $actions = wc_get_account_orders_actions( $order ); if ( ! empty( $actions ) ) { - foreach ( $actions as $key => $action ) { + foreach ( $actions as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited echo '' . esc_html( $action['name'] ) . ''; } } @@ -76,7 +77,9 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?> - + @@ -85,11 +88,11 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?> max_num_pages ) : ?>
- + max_num_pages ) !== $current_page ) : ?> - +
@@ -97,9 +100,9 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
- + - +