woocommerce add placeholder to checkout form fields

Solutions on MaxInterview for woocommerce add placeholder to checkout form fields by the best coders in the world

showing results for - "woocommerce add placeholder to checkout form fields"
Dina
03 Feb 2016
1add_filter('woocommerce_checkout_fields', 'njengah_override_checkout_fields');
2
3function njengah_override_checkout_fields($fields)
4
5 {
6
7 unset($fields['billing']['billing_address_2']);
8
9 $fields['billing']['billing_company']['placeholder'] = 'Business Name';
10
11 $fields['billing']['billing_company']['label'] = 'Business Name';
12
13 $fields['billing']['billing_first_name']['placeholder'] = 'First Name';
14
15 $fields['shipping']['shipping_first_name']['placeholder'] = 'First Name';
16
17 $fields['shipping']['shipping_last_name']['placeholder'] = 'Last Name';
18
19 $fields['shipping']['shipping_company']['placeholder'] = 'Company Name';
20
21 $fields['billing']['billing_last_name']['placeholder'] = 'Last Name';
22
23 $fields['billing']['billing_email']['placeholder'] = 'Email Address ';
24
25 $fields['billing']['billing_phone']['placeholder'] = 'Phone ';
26
27 return $fields;
28
29 }