Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Contributor kluver

    (@kluver)

    Hi @cacambo,

    You can hide it with a little code snippet that adds some custom CSS:

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles' );
    function wpo_wcpdf_custom_styles () {
    	?>
    	.order-details th.quantity,
    	.order-details td.quantity { 
    		color: rgba(0,0,0,0); 
    	}
    	<?php
    }

    This code snippet should be added to the functions.php of your child theme or with a plugin like Code Snippets. If you haven’t worked with functions.php or code snippets before please read this: How to use filters

    Plugin Contributor kluver

    (@kluver)

    Quick follow-up. For a solution without additional coding, check out our Premium Templates extension. This will easily let you modify order data on your documents with the customizer. Simply remove the ‘Quantity’ block and you are good to go!

    Thread Starter cacambo

    (@cacambo)

    What if i would like to do the same with price?

    add_action( ‘wpo_wcpdf_custom_styles’, ‘wpo_wcpdf_custom_styles’ );
    function wpo_wcpdf_custom_styles () {
    ?>
    .order-details th.price,
    .order-details td.price{
    color: rgba(0,0,0,0);
    }
    <?php
    }

    is it??

    Plugin Contributor Ewout

    (@pomegranate)

    ??

    Thread Starter cacambo

    (@cacambo)

    Doens’t work sr

    Thread Starter cacambo

    (@cacambo)

    Could you send the snippet to me please?

    Plugin Contributor Ewout

    (@pomegranate)

    This is the correct code snippet (for the free version). How/where did you add this snippet? If you also use the snippet to hide the quantity, make sure to give them different function names, otherwise they collide. i.e.:

    
    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles_hide_price' );
    function wpo_wcpdf_custom_styles_hide_price () {
    	?>
    	.order-details th.price,
    	.order-details td.price{
    		color: rgba(0,0,0,0);
    	}
    	<?php
    }
    
    Thread Starter cacambo

    (@cacambo)

    That’s Works,
    Thank you very much sr.

    What about if i want use Single_price instead of Order_price? where i need to change or could you send me a snippet??

    Plugin Contributor Ewout

    (@pomegranate)

    Must have been the function name then, this is exactly the same as the one you posted ??

    if you want the unit price you’ll have to extract this from the order data yourself in a custom template, this is something we cannot provide as part of support for the free version but our Premium Templates extension offers this out of the box with the customizer:

    Thread Starter cacambo

    (@cacambo)

    Thank you

    Thread Starter cacambo

    (@cacambo)

    Hi there, is it possible to make same changes on invoice such as use Measurement Quantity instead of woocommerce standard quantity??

    I’m using woocommerce measurement beacuse i need to use metric and unit, the point is, that in my invoice i’m getting to Quantities, and it’s very complicated to me, so i’de like to use only measurement quantity

    Thread Starter cacambo

    (@cacambo)

    Plugin Contributor Ewout

    (@pomegranate)

    With the Premium Templates extension you can remove the item meta from below the product into a separate column as in your example.

    I don’t know where this ‘Preco’ column comes from, the default output of our plugin doesn’t show a unit price column (and certainly not a x1), so I think these were customizations that were made to the template, you’ll have to ask the person that made these changes if they can remove that.

    Thread Starter cacambo

    (@cacambo)

    Thank you sr.
    I’ll buy your Premium version

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Ho to Remove/hide quantity from invoice and packing slip’ is closed to new replies.