A simple, powerful and independent e-commerce platform.
Sell anything with ease.

Rename checkout fields

You can rename any of the fields on the checkout page with this code. Delete any lines that are not needed.

/**
 * Rename checkout fields
 */

add_filter('woocommerce_checkout_fields', 'cc_rename_checkout_fields', 99);

function cc_rename_checkout_fields($fields) {

  $fields['billing']['billing_first_name']['label'] = 'Billing First name';
  $fields['billing']['billing_last_name']['label'] = 'Billing Last name';
  $fields['billing']['billing_company']['label'] = 'Billing Company';
  $fields['billing']['billing_city']['label'] = 'Billing Town/City';
  $fields['billing']['billing_state']['label'] = 'Billing State';
  $fields['billing']['billing_postcode']['label'] = 'Billing Postcode';
  $fields['billing']['billing_country']['label'] = 'Billing Country';
  $fields['billing']['billing_phone']['label'] = 'Billing Phone';
  $fields['billing']['billing_email']['label'] = 'Billing Email';
  $fields['billing']['billing_address_1']['label'] = 'Billing Address';
  $fields['shipping']['shipping_first_name']['label'] = 'Shipping First name';
  $fields['shipping']['shipping_last_name']['label'] = 'Shipping Last name';
  $fields['shipping']['shipping_company']['label'] = 'Shipping Company';
  $fields['shipping']['shipping_city']['label'] = 'Shipping Town/City';
  $fields['shipping']['shipping_state']['label'] = 'Shipping State';
  $fields['shipping']['shipping_postcode']['label'] = 'Shipping Postcode';
  $fields['shipping']['shipping_country']['label'] = 'Shipping Country';
  $fields['shipping']['shipping_phone']['label'] = 'Shipping Phone';
  $fields['shipping']['shipping_email']['label'] = 'Shipping Email';
  $fields['shipping']['shipping_address_1']['label'] = 'Shipping Address';
  $fields['order']['order_comments']['label'] = 'Your order comments';
  $fields['order']['order_comments']['placeholder'] = 'Add order comments here';

  return $fields;

}
View Raw Code ID: 1105