Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! You can do this with custom styles.

    The best way to do this is by adding the following code to your theme functions (functions.php):

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles' );
    function wpo_wcpdf_custom_styles () {
        ?>
        .packing-slip .document-type-label {
            display: none;
        }
        .address {
            font-sie: 11pt;
        }
        <?php
    }

    Let me know if you have any other questions!

    Ewout

    Thread Starter savisland

    (@savisland)

    Hi,

    Thank you for your reply.

    I have followed your instructions above but I do not see any changes to the invoice at all.

    I am also looking to show only the shipping address (with bigger text) on the pdf invoice, without the word invoice at the top of the page.

    Currently my pdf invoice is showing N/A for the billing address then ship to, at the right of that.

    Hope you can help.

    Thanks

    Plugin Contributor Ewout

    (@pomegranate)

    Hi!
    The first part only hides the packing slip title, not the invoice. I made a typo in the second part (sie in stead of size). Try this, it will also hide the billing address from the invoice:

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles' );
    function wpo_wcpdf_custom_styles () {
        ?>
        /* hide document title */
        .document-type-label {
            display: none !important;
        }
        /* increase address font size */
        .address {
            font-size: 11pt;
        }
        /* hide billing address from invoice */
        .invoice .billing-address {
            display: none;
        }
        <?php
    }
    Thread Starter savisland

    (@savisland)

    Hi,

    Thank you for your quick reply.

    We are getting somewhere now.

    The billing address is now removed from the invoice and the text is larger.

    But it is still showing Invoice and Packing Slip at the top of both.

    Plugin Contributor Ewout

    (@pomegranate)

    I see, you’re probably not using a header image. The document title is printed if no header image is set, but in a different location (therefor requires different code).

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles' );
    function wpo_wcpdf_custom_styles () {
        ?>
        /* hide document title */
        .header, .document-type-label {
            display: none !important;
        }
        /* increase address font size */
        .address {
            font-size: 11pt;
        }
        /* hide billing address from invoice */
        .invoice .billing-address {
            display: none;
        }
        <?php
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Make customer address bigger and remove text’ is closed to new replies.