• Resolved acidburnsmk

    (@acidburnsmk)


    How can i remove part of invoice template shipping line:

    Shipping **** $ via DHL

    I want to remove only text after the shipping cost price “via DHL” or “via %whatever method it is”

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @acidburnsmk,

    You can remove that text with a single CSS rule, taking advantage of the PDF template action hooks, specifically wpo_wcpdf_custom_styles.

    Actually, I have written already the code snippet for you to achieve it, here:

    /**
     * PDF Invoices & Packing Slip for WooCommerce:
     * Add custom styles to the PDF documents 
     */
    add_action( 'wpo_wcpdf_custom_styles', function( $document_type, $document ) {
        ?>
    	.shipped_via {
    		display: none;
    	}
        <?php
    }, 10, 2 );

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Thread Starter acidburnsmk

    (@acidburnsmk)

    Thanks. It works!

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Thanks for confirming that it worked, @acidburnsmk:

    If you don’t mind and have the time, do you think you could leave us a review?

    Thanks in advance and all the best with your store!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove part of shipping line’ is closed to new replies.