• Resolved cokolwiekbartosz

    (@cokolwiekbartosz)


    Hi there, I’m using it for Polish invoices and in Poland we’re using 5 digit postcode with a dash “-” after first two digits, so it’s like 12-345. On my website I’m selling only to polish customers so… I need that dash so hard, instead of current 12345 format at generated invoice – how can I change the format of postcode before the invoice will be generated from 12345 to 12-345?

Viewing 1 replies (of 1 total)
  • Plugin Author Bas Elbers

    (@baaaaas)

    You will need to create a custom template and customize the billing and/or shipping addresses. Check FAQ for custom template.

    You can get all data individually like below examples:
    $this->order->billing_postcode
    $this->order->shipping_postcode

    To place a - on second position in string use:
    <?php echo substr_replace($this->order->billing_postcode, '-', 2, 0); ?>

    For all properties check WooCommerce doc.

    If you would like me to help you out with the complete template, just shoot me an email.

    • This reply was modified 7 years, 11 months ago by Bas Elbers.
Viewing 1 replies (of 1 total)
  • The topic ‘Postcode with a dash’ is closed to new replies.