diff --git a/woocommerce/cart/cart-empty.php b/woocommerce/cart/cart-empty.php index fd722cb..d01b640 100644 --- a/woocommerce/cart/cart-empty.php +++ b/woocommerce/cart/cart-empty.php @@ -10,19 +10,14 @@ * 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/ - * @author WooThemes + * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates - * @version 3.1.0 + * @version 3.5.0 */ -if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly -} +defined( 'ABSPATH' ) || exit; -wc_print_notices(); - -/** +/* * @hooked wc_empty_cart_message - 10 */ do_action( 'woocommerce_cart_is_empty' ); @@ -30,7 +25,7 @@ do_action( 'woocommerce_cart_is_empty' ); if ( wc_get_page_id( 'shop' ) > 0 ) : ?>

- +

diff --git a/woocommerce/cart/cart.php b/woocommerce/cart/cart.php index 2b4efc5..ee0ad99 100644 --- a/woocommerce/cart/cart.php +++ b/woocommerce/cart/cart.php @@ -12,13 +12,11 @@ * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates - * @version 3.4.0 + * @version 3.5.0 */ defined( 'ABSPATH' ) || exit; -wc_print_notices(); - do_action( 'woocommerce_before_cart' ); ?>
@@ -66,9 +64,9 @@ do_action( 'woocommerce_before_cart' ); ?> $thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); if ( ! $product_permalink ) { - echo wp_kses_post( $thumbnail ); + echo $thumbnail; // PHPCS: XSS ok. } else { - printf( '%s', esc_url( $product_permalink ), wp_kses_post( $thumbnail ) ); + printf( '%s', esc_url( $product_permalink ), $thumbnail ); // PHPCS: XSS ok. } ?> @@ -88,7 +86,7 @@ do_action( 'woocommerce_before_cart' ); ?> // Backorder notification. if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) { - echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '

' . esc_html__( 'Available on backorder', 'understrap' ) . '

' ) ); + echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '

' . esc_html__( 'Available on backorder', 'understrap' ) . '

', $product_id ) ); } ?> @@ -140,7 +138,7 @@ do_action( 'woocommerce_before_cart' ); ?> - + diff --git a/woocommerce/cart/mini-cart.php b/woocommerce/cart/mini-cart.php index e339796..dcf0df2 100644 --- a/woocommerce/cart/mini-cart.php +++ b/woocommerce/cart/mini-cart.php @@ -15,7 +15,7 @@ * @see https://docs.woocommerce.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates - * @version 3.3.0 + * @version 3.5.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; @@ -29,41 +29,42 @@ do_action( 'woocommerce_before_mini_cart' ); ?> cart->get_cart() as $cart_item_key => $cart_item ) { - $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); - $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); + foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { + $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); + $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); - if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ) ) { - $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ); - $thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); - $product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); - $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); - ?> -
  • - exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ) ) { + $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ); + $thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); + $product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); + $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); + ?> +
  • + ×', esc_url( wc_get_cart_remove_url( $cart_item_key ) ), __( 'Remove this item', 'understrap' ), esc_attr( $product_id ), esc_attr( $cart_item_key ), esc_attr( $_product->get_sku() ) - ), $cart_item_key ); - ?> - - + ), $cart_item_key + ); + ?> + + - + - ' . sprintf( '%s × %s', $cart_item['quantity'], $product_price ) . '', $cart_item, $cart_item_key ); ?>
  • diff --git a/woocommerce/checkout/form-checkout.php b/woocommerce/checkout/form-checkout.php index 7081da9..b841a52 100644 --- a/woocommerce/checkout/form-checkout.php +++ b/woocommerce/checkout/form-checkout.php @@ -10,23 +10,20 @@ * 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/ - * @author WooThemes - * @package WooCommerce/Templates - * @version 2.3.0 + * @see https://docs.woocommerce.com/document/template-structure/ + * @package WooCommerce/Templates + * @version 3.5.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } -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 registration is disabled and not logged in, the user cannot checkout. if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in() ) { - echo apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'understrap' ) ); + echo esc_html( apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'understrap' ) ) ); return; } @@ -39,7 +36,7 @@ if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_requir
    -
    +
    @@ -52,7 +49,7 @@ if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_requir -

    +

    diff --git a/woocommerce/myaccount/form-edit-account.php b/woocommerce/myaccount/form-edit-account.php index 2746049..467b480 100644 --- a/woocommerce/myaccount/form-edit-account.php +++ b/woocommerce/myaccount/form-edit-account.php @@ -12,36 +12,36 @@ * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates - * @version 3.4.0 + * @version 3.5.0 */ defined( 'ABSPATH' ) || exit; do_action( 'woocommerce_before_edit_account_form' ); ?> - + >

    - +

    - +

    - +

    - +

    @@ -49,15 +49,15 @@ do_action( 'woocommerce_before_edit_account_form' ); ?>

    - +

    - +

    - +

    diff --git a/woocommerce/myaccount/form-login.php b/woocommerce/myaccount/form-login.php index 441172f..5c2150f 100644 --- a/woocommerce/myaccount/form-login.php +++ b/woocommerce/myaccount/form-login.php @@ -12,24 +12,20 @@ * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates - * @version 3.4.0 + * @version 3.5.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } -?> - - - - +do_action( 'woocommerce_before_customer_login_form' ); ?>
    -
    +
    @@ -41,18 +37,18 @@ if ( ! defined( 'ABSPATH' ) ) {

    - +

    - +

    - + @@ -73,7 +69,7 @@ if ( ! defined( 'ABSPATH' ) ) {

    - + > @@ -81,21 +77,21 @@ if ( ! defined( 'ABSPATH' ) ) {

    - +

    - +

    - +

    diff --git a/woocommerce/myaccount/form-reset-password.php b/woocommerce/myaccount/form-reset-password.php index d2bc859..c0c22e8 100644 --- a/woocommerce/myaccount/form-reset-password.php +++ b/woocommerce/myaccount/form-reset-password.php @@ -12,24 +12,24 @@ * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates - * @version 3.4.0 + * @version 3.5.0 */ defined( 'ABSPATH' ) || exit; -wc_print_notices(); ?> +?> -

    +

    - +

    - +