This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_billing_fields' , 'ced_remove_billing_fields' ); | |
function ced_remove_billing_fields( $fields ) { | |
unset($fields['billing_last_name']); | |
return $fields; | |
} | |
add_filter( 'woocommerce_checkout_fields' , 'ced_rename_checkout_fields' ); | |
// Change placeholder and label text | |
function ced_rename_checkout_fields( $fields ) { | |
$fields['billing']['billing_first_name']['placeholder'] = 'Name'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_wc_custom_fields($fields) { | |
global $woocommerce; | |
$countries_obj = new WC_Countries(); | |
$countries = $countries_obj->__get('countries'); | |
$fields['billing']['billing_first_name'] = array( | |
'label' => '', | |
'placeholder' => _x('First Name*', 'placeholder', 'woocommerce'), | |
'required' => true, | |
'class' => array( 'form-row-first' ), |
OlderNewer