I tried this code to achieve this:
add_filter( 'woocommerce_cart_item_subtotal', 'show_coupon_item_subtotal_discount', 100, 3 );
function show_coupon_item_subtotal_discount( $subtotal, $cart_item, $cart_item_key ){
if( $cart_item['line_subtotal'] !== $cart_item['line_total'] ) {
$subtotal = sprintf( '<del>%s</del> <ins>%s<ins>', wc_price($cart_item['line_subtotal']), wc_price($cart_item['line_total']) );
}
return $subtotal;
}
But unfortunately it shows a wrong striked price as you can see here. Whats wrong with this code?
Its regarding this page: keimster.de/kasse