• Resolved Olufemi

    (@yurbshop21)


    Hi guys, trust y’all good!

    Please, how can I change checkout text label “state / county” to just “state” and change “city” to “Local government area”.

    Thanks!

    • This topic was modified 1 year, 3 months ago by Olufemi.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Condless

    (@condless)

    Hi,
    Please try the following code into your theme’s functions.php file:

    add_filter( 'woocommerce_get_country_locale', 'wc_set_locale_field_labels', 9999 );
    function wc_set_locale_field_labels( $locale ) {
    	$country_code = 'NG'; // Update your country code
    	$locale[ $country_code ]['new_state']['label'] = __( 'State', 'woocommerce' );
    	$locale[ $country_code ]['state']['label'] = __( 'Local government area', 'woocommerce' );
    	return $locale;
    }
    
    Thread Starter Olufemi

    (@yurbshop21)

    Thanks, it works…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change text label in checkout’ is closed to new replies.