• Resolved Flash Buddy

    (@flashbuddy)


    1st – Amazing your dedication; all the time for all the answers?!

    2nd – My client wants to include the Delivery Notice with the orders, but since many are gifts, they want to hide Method of Payment and Prices.

    I tried the FAQ functions code to no avail:

    function my_price_free_delivery_note() {
        ?>
            <style>
                .delivery-note .total-heading span,
                .delivery-note .product-price span {
                    display: none;
                }
            </style>
        <?php
    }
    add_action( 'wcdn_head', 'my_price_free_delivery_note', 20 );

    It appears the code has changed.


    <tfoot> <tr> <td class="total-name">Cart Subtotal</td> <td class="total-price"><span class="amount">$99.00</span></td> </tr> <tr> <td class="total-name">Shipping</td> <td class="total-price">Shipping</td> </tr> <tr> <td class="total-name">Order Total</td> <td class="total-price"><span class="amount">$99.00</span></td> </tr> </tfoot>

    Hiding span.amount hides the amounts on both the Invoice and Delivery Notice. Ideas?

    https://wordpress.org/plugins/woocommerce-delivery-notes/

Viewing 1 replies (of 1 total)
  • hi, thanks. there is a new version online (3.1) that has slightly renamed class names. use the following code to hide the prices (from the new FAQ):

    Can I hide the prices on the delivery note?

    Sure, the easiest way is to hide them with some CSS that is hooked in with wcdn_head.

    An example that hides the whole price column. Paste the code in the functions.php file of your theme:

    function my_price_free_delivery_note() {
    	?>
    		<style>
    			.delivery-note .head-price span,
    			.delivery-note .product-price span,
    			.delivery-note .order-items tfoot {
    				display: none;
    			}
    			.delivery-note .order-items tbody tr:last-child {
    				border-bottom: 0.24em solid black;
    			}
    		</style>
    	<?php
    }
    add_action( 'wcdn_head', 'my_price_free_delivery_note', 20 );
Viewing 1 replies (of 1 total)
  • The topic ‘Hide Prices on Delivery Notice’ is closed to new replies.