Advertisement
lorro

WooCommerce - Show city field placeholder

Nov 5th, 2016
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2. // show city field placeholder
  3. // code goes in functions.php for your child theme
  4. // See: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
  5. add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
  6. function custom_override_checkout_fields( $fields ) {
  7.   $fields['billing']['billing_city']['placeholder'] = 'Town/City (required)';
  8.   return $fields;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement