Hi There,
Unfortunately there is no reliable way to do this. The price in the order is not tied to the product price (which is actually a good thing), and woocommerce does not save the regular price – this is different for discounts.
You could check the price against the product price to see if was a sales price, but like I said, it’s not very reliable. It also depends on your tax settings whether this price actually makes sense (or if it even works at all!). That said, you can try this code in your themes functions.php:
add_filter( 'wpo_wcpdf_order_item_data', 'wpo_wcpdf_order_regular_price', 10, 2 );
function wpo_wcpdf_order_regular_price ( $item_data, $order) {
$sale_price = $item_data['product']->sale_price;
$current_price = $item_data['item']['line_subtotal'];
if ( !empty($sale_price) && $sale_price == $current_price) {
$item_data['order_price'] = sprintf('<s>%s</s><br/>', wc_price($item_data['product']->regular_price)).$item_data['order_price'];
}
return $item_data;
}
the strikethrough looks a bit funky on the simple template…