php - Override some Woocommerce checkout fields with a filter hook -


i using wordpress 4.8.1 , using bridge theme .
facing problem regarding overriding woocommerce checkout fields placeholders.
using dedicated woocommerce filter hook doesn't changes on checkout page:

function override_checkout_fields($fields) {      $fields['billing']['billing_first_name'] = array(         'label' => '',         'placeholder' => _x('first name*', 'placeholder', 'woocommerce'),         'required' => true,         'class' => array('checkout-billing-first-name')     );     $fields['billing']['billing_last_name'] = array(         'label' => '',         'placeholder' => _x('last name*', 'placeholder', 'woocommerce'),         'required' => true,         'class' => array('checkout-billing-last-name')     );       return $fields; }  add_filter('woocommerce_billing_fields', 'override_checkout_fields');     

i have used filter woocommerce_checkout_fields too, doesnt change placeholders, have tried using woocommerce_billing_fields, there no changes either.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -