Ok so the first thing you’ll need to do is copy the cart-table.php file from the plugin to your child-theme/woocommerce/wc-cart-pdf/cart-table.php .
You can find the template code here .
Then you can modify the cart-table.php file within your child theme, this will prevent your modifications from being overridden when updating the plugin.
In the cart-table.php file within your child theme, edit lines 110-112, to look like the following:
<?php
$on_sale = $_product->is_on_sale();
$regular_price = $_product->get_regular_price();
$sale_price = $_product->get_sale_price();
if ( $on_sale && ( $sale_price < $regular_price ) ) {
echo apply_filters( 'woocommerce_cart_item_price', apply_filters( 'woocommerce_cart_product_price', wc_format_sale_price( $regular_price, $sale_price ), $_product ), $cart_item, $cart_item_key ); // phpcs:ignore
} else {
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // phpcs:ignore
}
?>
It should look like this:
View Full Image
This reply was modified 11 months, 3 weeks ago by David Jensen .