Add-on price displaying on packing slip
-
Hello, I am having a display issue with the PDF Invoices & Packing Slips plugin when it comes to product add-ons (I’m using the YITH WooCommerce Product Add-ons & Extra Options plugin). Currently it is displaying the add-on prices on the packing slips when I need them to not show. Prior to updating, the prices weren’t visible but now they are.
When inspecting the order page that shows the products in an order along with an add-on product on the admin side, here is what the HTML looks like:
<div class ="view"> <table cellspacing="0" class="display_meta"> <tbody> <tr> <th>Add-on title:</th> <td> <p> "Add-on Item (+" <span class="woocommerce-Price-amount amount"> <span class="woocommerce-Price-currencySymbol">$</span> "5.00" </span> ")" </p> </td> </tr> </tbody> </table> </div>
When generating a packing slip for the order, the items read like this:
Product
- Add-on Item (+5.00)
This is the code I currently have in my functions.php, but it doesn’t seem to be grabbing the class hide the price:
add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_hide_addon', 10, 2 ); function wpo_wcpdf_hide_addon ( $document_type, $document ) { ?> .packing-slip .wc-item-meta li:before { content: "-"; } .packing-slip .wc-item-meta-label { display: none; } .woocommerce-Price-amount .amount { display: none; } <?php }
Do you know why this method might not be working or if there is another way I might be able to achieve hiding the price on the packing slip?
Thank you!
- The topic ‘Add-on price displaying on packing slip’ is closed to new replies.