• Resolved lila22

    (@lila22)


    It seems that no matter what i do i can not put a place holder in the state select field

    $fields[‘billing’][‘billing_state’][‘placeholder’] = ‘District’;
    this should work but it does not…
    any ideas are welcome
    Thank you!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Diana Burduja

    (@diana_burduja)

    The PHP line looks alright, but I have no other information as to where and in what context it is used.

    First it needs to be included within the callback function of the “woocommerce_checkout_fields” filter. As follows:

    add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
    
    function custom_override_checkout_fields( $fields ) {
         $fields['billing']['billing_state']['placeholder'] = 'District';
         return $fields;
    }

    Secondly, the PHP snippet needs to go in the child theme’s functions.php file or it needs to be added to the website with the help of a plugin similar to Code Snippets.

    Note that the input placeholder has nothing to do with the multi-step checkout plugin. If you successfully change the placeholder with the multi-step checkout plugin deactivated, then it should work with the plugin activated.

Viewing 1 replies (of 1 total)
  • The topic ‘Can not put placeholder in state field’ is closed to new replies.