daily pastebin goal
13%
SHARE
TWEET

WooCommerce - Show city field placeholder

lorro Nov 5th, 2016 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top