2
votes

From Display on sale cart item formatted prices range in WooCommerce answer to my previous question, I was able to display on sale cart item formatted prices.

Unfortunately I was not able to use the product title filter to add the single product price below the product title in the checkout page. The first image shows what i try to achieve - the second how it looks like right now.

  1. My cart page already shows the price below the title: enter image description here

  2. My checkout page should show the price too: enter image description here

Any idea how to add the single product price html below the product title in the checkout page?

1

1 Answers

1
votes

Based on your previous question answer, simply use also the following:

add_filter( 'woocommerce_checkout_cart_item_quantity', 'filter_checkout_cart_item_quantity', 10, 3 );
function filter_checkout_cart_item_quantity( $item_quantity, $cart_item, $cart_item_key ) {
    return $cart_item['data']->get_price_html() . ' ' . $item_quantity;
}

Code goes in functions.php file of the active child theme (or active theme). Tested and works.