WooCommerce field labels not shown

For some reason, my WooCommerce isn’t showing labels nor placeholders for custom fields. No matter whether I’m adding the fields manually through functions.php (code below) or using plugins like ‘WooCommerce Mailchimp’, the fields shows up alright but there’s no label next to it.

What might be causing this type of error?

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );

function custom_override_checkout_fields( $fields ) {
     $fields['shipping']['shipping_phone'] = array(
        'label'     => __('Phone', 'woocommerce'),
    'placeholder'   => _x('Phone', 'placeholder', 'woocommerce'),
    'required'  => false,
    'class'     => array('form-row-wide'),
    'clear'     => true
     );

     return $fields;
}

Related posts

Leave a Reply

1 comment