Hi @tjos123,
Could you demonstrate the change you’d need with a screenshot? Some CSS will possibly be able to achieve this.
Hi @dpeyou, here’s the screenshot. Thanks!
https://snipboard.io/aKqvO2.jpg
And I then noticed that the country doesn’t show by default. Only the city or state, if submitted by customers.
Hi @tjos123,
Thanks for providing the screenshot.
Try with this code snippet:
add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles', 10, 2 );
function wpo_wcpdf_custom_styles ( $document_type, $document ) {
if ( $document_type == 'invoice' ) {
?>
.billing-address .billing-phone {
margin-top: 3mm;
}
<?php
}
}
If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters
Let me know if it worked!
Hi @yordansoares. Thanks for that. It works for billing field, but only the invoice pdf and not packing pdf. And it also doesn’t work for the shipping side for both invoice and packing slip.
You’re right, @tjos123.
Please replace my previous code for this one:
add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles', 10, 2 );
function wpo_wcpdf_custom_styles ( $document_type, $document ) {
?>
.billing-address .billing-phone,
.shipping-address .billing-phone {
margin-top: 3mm;
}
<?php
}
Let me know if this time it worked 🙂
Thanks, @yordansoares.
Now the billing works for packing slips too. But the shipping field isn’t working for both pdf.
Are you working with a custom template, or maybe adding the phone number in both addresses through a code snippet?
By default, the phone number is displayed in the billing address on invoices, and shipping address on packing slips (located on the right side too), but not in both at the same time.