From 14676bb3f35297f822d57d6f3d8bbbf73e2a870e Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 22 Mar 2018 13:56:16 -0600 Subject: [PATCH] More Formatting Make formatting identical with Woo files, for easier syncing later; More capitalization fixes on text, making identical to Woo files; --- woocommerce/cart/cart.php | 30 ++++++++++----------- woocommerce/checkout/form-checkout.php | 2 +- woocommerce/checkout/form-pay.php | 6 ++--- woocommerce/myaccount/form-edit-address.php | 10 +++---- woocommerce/myaccount/my-orders.php | 2 +- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/woocommerce/cart/cart.php b/woocommerce/cart/cart.php index d10a959..f27c76e 100644 --- a/woocommerce/cart/cart.php +++ b/woocommerce/cart/cart.php @@ -100,22 +100,20 @@ do_action( 'woocommerce_before_cart' ); ?> ?> - - is_sold_individually() ) { - $product_quantity = sprintf( '1 ', $cart_item_key ); - } else { - $product_quantity = woocommerce_quantity_input( array( - 'input_name' => "cart[{$cart_item_key}][qty]", - 'input_value' => $cart_item['quantity'], - 'max_value' => $_product->get_max_purchase_quantity(), - 'min_value' => '0', - ), $_product, false ); - } + is_sold_individually() ) { + $product_quantity = sprintf( '1 ', $cart_item_key ); + } else { + $product_quantity = woocommerce_quantity_input( array( + 'input_name' => "cart[{$cart_item_key}][qty]", + 'input_value' => $cart_item['quantity'], + 'max_value' => $_product->get_max_purchase_quantity(), + 'min_value' => '0', + ), $_product, false ); + } - echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); - ?> - + echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); + ?> * @hooked woocommerce_cross_sell_display * @hooked woocommerce_cart_totals - 10 */ - do_action( 'woocommerce_cart_collaterals' ); + do_action( 'woocommerce_cart_collaterals' ); ?> diff --git a/woocommerce/checkout/form-checkout.php b/woocommerce/checkout/form-checkout.php index 5167ab5..c8f4413 100644 --- a/woocommerce/checkout/form-checkout.php +++ b/woocommerce/checkout/form-checkout.php @@ -24,8 +24,8 @@ wc_print_notices(); do_action( 'woocommerce_before_checkout_form', $checkout ); -// If checkout registration is disabled and not logged in, the user cannot checkout. if ( ! $checkout->enable_signup && ! $checkout->enable_guest_checkout && ! is_user_logged_in() ) { +// If checkout registration is disabled and not logged in, the user cannot checkout echo apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'understrap' ) ); return; } diff --git a/woocommerce/checkout/form-pay.php b/woocommerce/checkout/form-pay.php index a5b4774..5edf0d1 100644 --- a/woocommerce/checkout/form-pay.php +++ b/woocommerce/checkout/form-pay.php @@ -35,9 +35,9 @@ if ( ! defined( 'ABSPATH' ) ) { get_items() ) > 0 ) : ?> get_items() as $item_id => $item ) : ?> diff --git a/woocommerce/myaccount/form-edit-address.php b/woocommerce/myaccount/form-edit-address.php index 2ae78f0..edfb325 100644 --- a/woocommerce/myaccount/form-edit-address.php +++ b/woocommerce/myaccount/form-edit-address.php @@ -37,12 +37,12 @@ do_action( 'woocommerce_before_edit_account_address_form' ); ?>
$field ) { - if ( isset( $field['country_field'], $address[ $field['country_field'] ] ) ) { - $field['country'] = wc_get_post_data_by_key( $field['country_field'], $address[ $field['country_field'] ]['value'] ); - } - woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) ); + foreach ( $address as $key => $field ) { + if ( isset( $field['country_field'], $address[ $field['country_field'] ] ) ) { + $field['country'] = wc_get_post_data_by_key( $field['country_field'], $address[ $field['country_field'] ]['value'] ); } + woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) ); + } ?>
diff --git a/woocommerce/myaccount/my-orders.php b/woocommerce/myaccount/my-orders.php index df2febe..f0a4215 100644 --- a/woocommerce/myaccount/my-orders.php +++ b/woocommerce/myaccount/my-orders.php @@ -27,7 +27,7 @@ $customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_q if ( $customer_orders ) : ?> -

+