Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter paradisiac

    (@paradisiac)

    I solved this issue!

    However, there is one thing that I cannot seem to tweak. Whatever I do, the line break (</br>) does not work for Payment Method.

    Issue:
    Basically, we want one space between Invoice Date & Number and Payment Method ->https://i.imgur.com/aQ4Qn6U.png. I have tried adding </br> through invoice.php, I have tried setting :after and :before content via css, margins too, but nothing works.

    Can you please help with this

    Plugin Contributor Darren Peyou

    (@dpeyou)

    Hi @paradisiac,

    The way I’d go about removing those would be using CSS:

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_hide_order_date_and_number', 10, 2 );
    function wpo_wcpdf_hide_order_date_and_number ( $document_type, $document ) {
    ?>
    	.invoice tr.order-number, .invoice tr.order-date {
    		display: none;
    	}
    <?php
    }

    If you don’t know how to use hooks, check this guide out: https://docs.wpovernight.com/general/how-to-use-filters/

    If you manually removed them from your custom template files, did you check to make sure you had switched themes after creating this custom template?

    Plugin Contributor Darren Peyou

    (@dpeyou)

    @paradisiac,

    I’m glad you solved the issue!

    Since we are dealing with HTML tables, you need to insert a space in the table cells themselves using something like padding-top: 1cm;, so something like this:

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_hide_order_date_and_number', 10, 2 );
    function wpo_wcpdf_hide_order_date_and_number ( $document_type, $document ) {
    ?>
    	.invoice tr.payment-method th, .invoice tr.payment-method td {
    		padding-top: 1cm;
    	}
    <?php
    }

    It is also preferable to keep the threads at one issue per thread, so that users can find answers more easily. ??

    • This reply was modified 3 years, 4 months ago by Darren Peyou.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing Order Number & Order Date’ is closed to new replies.