If you are having issues with Gutenberg editor, please simply download official Classic editor plugin.
Haven't found you're looking for? Visit goodstore howto web

Changing label for shipping and billing state

  • I've added the following hook into the functions.php to amend the state label. When it is loading, I can see that it gets updated momentarily but then when the styling for the droplist or page completed (couple of sec later) - it changes back to the original state label again which is Province.
    Is this due to the theme?.. 


    // Hook in
    add_filter( 'woocommerce_billing_fields', 'wc_billing_fields_state_filter', 10, 1 );
    // Our hooked in function - $fields is passed via the filter!
    function wc_billing_fields_state_filter( $address_fields ) {
    $address_fields['billing_state']['label'] = 'City/Town';
    return $address_fields;
    }
  • All following comments are shown for registered users only!

    (1 next comment)
This discussion has been solved.
All Discussions