title: Cart recap displays "quantity" instead of number of products
body: <p>With WooCommerce and a Storefront Child Theme, in the checkout page, the cart recap displays &quot;quantity&quot; instead of the actual number of products.</p>
  <p>If I add <code>&lt;?php echo $cart_item['quantity'] ?&gt;</code> to the code, it displays the correct quantity value. Maybe it's the <code>filter</code> that is wrong?</p>
  <p><strong>review-order.php (using <a href="https://yithemes.com/themes/plugins/yith-woocommerce-multi-step-checkout/" rel="nofollow noreferrer">Yith-Multi-step-checkout plugin</a>):</strong></p>
  <pre><code>&lt;?php
  /**
   * Review order table
   *
   * This template can be overridden by copying it to yourtheme/woocommerce/checkout/review-order.php.
   *
   * HOWEVER, on occasion WooCommerce will need to update template files and you
   * (the theme developer) will need to copy the new files to your theme to
   * maintain compatibility. We try to do this as little as possible, but it does
   * 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/
   * @package WooCommerce/Templates
   * @version 3.8.0
   */
  
  defined( 'ABSPATH' ) || exit;
  ?&gt;
  &lt;table class=&quot;shop_table woocommerce-checkout-review-order-table&quot;&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th class=&quot;product-name&quot;&gt;&lt;?php esc_html_e( 'Product', 'woocommerce' ); ?&gt;&lt;/th&gt;
              &lt;th class=&quot;product-total&quot;&gt;&lt;?php esc_html_e( 'Subtotal', 'woocommerce' ); ?&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;?php
          do_action( 'woocommerce_review_order_before_cart_contents' );
  
          foreach ( WC()-&gt;cart-&gt;get_cart() as $cart_item_key =&gt; $cart_item ) {
              $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
  
              if ( $_product &amp;&amp; $_product-&gt;exists() &amp;&amp; $cart_item['quantity'] &gt; 0 &amp;&amp; apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
                  ?&gt;
                  &lt;tr class=&quot;&lt;?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?&gt;&quot;&gt;
                      &lt;th colspan=&quot;2&quot; class=&quot;product-name&quot;&gt;
                          &lt;?php 
                          // print_r(&quot;on est là&quot;);  
                          // print_r($_product-&gt;get_name()); 
                          
                          echo '&lt;span class=&quot;product-name__thumbnail&quot; style=&quot;float: left; padding-right: 15px&quot;&gt;' . get_the_post_thumbnail( $cart_item['product_id'], array( 60, 120 ) ) . '&lt;/span&gt;';
  
                          // echo apply_filters( 'woocommerce_cart_item_name', $_product-&gt;get_name(), $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 
  
                          $splitted = product_name_split($_product-&gt;get_name());
                          $productname = $splitted[0];
                          $productcolor = $splitted[1];
  
                          $words = explode(' ',trim($productname));                       
                          echo '&lt;span class=&quot;review-order-prod-name&quot;&gt;'.'&lt;span class=&quot;' . 'cat_product_name_word1' .'&quot;&gt;'.$words[0]. '&lt;/span&gt; '.'&lt;span class=&quot;cat_product_name_word2&quot;&gt;' .$words[1].'&lt;/span&gt;' .'&lt;/span&gt;&lt;br/&gt;';
                          echo wc_get_formatted_cart_item_data( $cart_item );
                          echo '&lt;span class=&quot;review-order-prod-color&quot;&gt;' . '–' . $productcolor.'&lt;/span&gt;';
                          
                          ?&gt;
                          &lt;?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' &lt;strong class=&quot;product-quantity&quot;&gt;' . sprintf( '&amp;times;&amp;nbsp;%s', $cart_item['quantity'] ) . '&lt;/strong&gt;', $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?&gt;
                      &lt;/th&gt;
                      &lt;td class=&quot;product-total&quot;&gt;
                          &lt;?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()-&gt;cart-&gt;get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;?php
              }
          }
  
          do_action( 'woocommerce_review_order_after_cart_contents' );
          
          // if ( ! wp_doing_ajax() ) {
          //         do_action('woocommerce_checkout_coupon_form');
          //     }
          
          // woocommerce_checkout_coupon_form();
          
  
          ?&gt;
      &lt;/tbody&gt;
      &lt;tfoot&gt;
  
          &lt;tr class=&quot;cart-subtotal&quot;&gt;
              &lt;th&gt;&lt;?php esc_html_e( 'Subtotal', 'woocommerce' ); ?&gt;&lt;/th&gt;
              &lt;td colspan=&quot;2&quot;&gt;&lt;?php wc_cart_totals_subtotal_html(); ?&gt;&lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;?php foreach ( WC()-&gt;cart-&gt;get_coupons() as $code =&gt; $coupon ) : ?&gt;
              &lt;tr class=&quot;cart-discount coupon-&lt;?php echo esc_attr( sanitize_title( $code ) ); ?&gt;&quot;&gt;
                  &lt;th&gt;&lt;?php wc_cart_totals_coupon_label( $coupon ); ?&gt;&lt;/th&gt;
                  &lt;td colspan=&quot;2&quot;&gt;&lt;?php wc_cart_totals_coupon_html( $coupon ); ?&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;?php endforeach; ?&gt;
  
          &lt;?php if ( WC()-&gt;cart-&gt;needs_shipping() &amp;&amp; WC()-&gt;cart-&gt;show_shipping() ) : ?&gt;
  
              &lt;?php do_action( 'woocommerce_review_order_before_shipping' ); ?&gt; 
  
              &lt;?php wc_cart_totals_shipping_html(); ?&gt;
  
              &lt;?php /*            
              &lt;tr class=&quot;cart-discount coupon-&lt;?php echo esc_attr( sanitize_title( $code ) ); ?&gt;&quot;&gt;
                  &lt;th&gt;&lt;?php esc_html_e( 'Shipping fees', 'woocommerce' ); ?&gt;&lt;/th&gt;
                  &lt;td colspan=&quot;2&quot;&gt;&lt;?php echo WC()-&gt;cart-&gt;get_shipping_total() ?  WC()-&gt;cart-&gt;get_shipping_total() : esc_html__( 'Calculated at next step', 'woocommerce' ); ?&gt;&lt;/td&gt;
              &lt;/tr&gt;
              */ ?&gt;
  
              &lt;?php do_action( 'woocommerce_review_order_after_shipping' ); ?&gt;
  
          &lt;?php endif; ?&gt;
  
          &lt;?php foreach ( WC()-&gt;cart-&gt;get_fees() as $fee ) : ?&gt;
              &lt;tr class=&quot;fee&quot;&gt;
                  &lt;th&gt;&lt;?php echo esc_html( $fee-&gt;name ); ?&gt;&lt;/th&gt;
                  &lt;td colspan=&quot;2&quot;&gt;&lt;?php wc_cart_totals_fee_html( $fee ); ?&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;?php endforeach; ?&gt;
  
          &lt;?php if ( wc_tax_enabled() &amp;&amp; ! WC()-&gt;cart-&gt;display_prices_including_tax() ) : ?&gt;
              &lt;?php if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) : ?&gt;
                  &lt;?php foreach ( WC()-&gt;cart-&gt;get_tax_totals() as $code =&gt; $tax ) : // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited ?&gt;
                      &lt;tr class=&quot;tax-rate tax-rate-&lt;?php echo esc_attr( sanitize_title( $code ) ); ?&gt;&quot;&gt;
                          &lt;th&gt;&lt;?php echo esc_html( $tax-&gt;label ); ?&gt;&lt;/th&gt;
                          &lt;td colspan=&quot;2&quot;&gt;&lt;?php echo wp_kses_post( $tax-&gt;formatted_amount ); ?&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;?php endforeach; ?&gt;
              &lt;?php else : ?&gt;
                  &lt;tr class=&quot;tax-total&quot;&gt;
                      &lt;th&gt;&lt;?php echo esc_html( WC()-&gt;countries-&gt;tax_or_vat() ); ?&gt;&lt;/th&gt;
                      &lt;td colspan=&quot;2&quot;&gt;&lt;?php wc_cart_totals_taxes_total_html(); ?&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;?php endif; ?&gt;
          &lt;?php endif; ?&gt;
  
          &lt;?php do_action( 'woocommerce_review_order_before_order_total' ); ?&gt;
  
          &lt;tr class=&quot;order-total&quot;&gt;
              &lt;th&gt;&lt;?php esc_html_e( 'Total', 'woocommerce' ); ?&gt;&lt;/th&gt;
              &lt;td colspan=&quot;2&quot;&gt;&lt;?php wc_cart_totals_order_total_html(); ?&gt;&lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;?php do_action( 'woocommerce_review_order_after_order_total' ); ?&gt;
  
      &lt;/tfoot&gt;
  &lt;/table&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/5TsYm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5TsYm.png" alt="enter image description here" /></a></p>
  <h2>Edit</h2>
  <p>Also I just discovered that ticking/unticking the &quot;ship to a different address&quot; box, multiplies the 'QUANTITY' text!</p>
  <p><a href="https://i.stack.imgur.com/FGs2u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FGs2u.png" alt="enter image description here" /></a></p>