Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #15718

    Dear Abundance,

    I’d like to change the ‘Postcode/Zip’ requirement in the Abundance checkout page to read ‘Phone Number’ instead.

    Could someone please tell me the coding I would look for and which template I would need to access– I believe I have to go to wp-content/plugins/woocommerce/classes/class-wc-checkout.php — as I was directed here before but I am just having trouble spotting the Postcode/Zip section.

    Much appreciated,



    I guess you can overwrite the label with following code – add it to the bottom of functions.php:

    // Hook in
    add_filter( 'woocommerce_checkout_fields' , 'inoplugs_override_checkout_fields' );

    // Our hooked in function - $fields is passed via the filter!
    function inoplugs_override_checkout_fields( $fields ) {
    $fields['billing']['billing_postcode']['label'] = 'Phone Number';
    $fields['shipping']['shipping_postcode']['label'] = 'Phone Number';
    return $fields;


    I would rather just change the template directly- the last time you were able to direct me to the original template so that where it said ‘special order notes’ I was instead able to write ‘delivery date’

    Is there any way you can direct me to the section of code where the ‘post code/zip’ label is so that I can just type ‘phone number’ instead. I am hesitant to add what you instructed above just because the last time I tried it I was met with a little bit of a disaster ie) my whole site disappeared . However going to the original source code which you were able to direct me to worked great.

    Thanks again




    Open up wp-content/plugins/woocommerce/classes/class-wc-countries.php and replace the label/placeholder text in following array:

    'postcode'	=> array(
    'label' => __('Postcode/Zip', 'woocommerce'),
    'placeholder' => __('Postcode/Zip', 'woocommerce'),
    'required' => true




    Hi Peter,

    Okay – that seemed to work okay. I am very close to getting everything just the way I want. Now I am hoping you can advise me if there’s a way under the tab Province (as I am based in Canada) if it can just automatically default to the choice of ‘Ontario’ under the drop down menu.





    Afaik it’s currently not possible to set a standard value for dropdowns or radio boxes.

    Best regards,


Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Changing Postcode/Zip in Checkout Page’ is closed to new replies.