Skip to content

Instantly share code, notes, and snippets.

@claudiosanches
Created May 24, 2014 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claudiosanches/85aef11cd81049246784 to your computer and use it in GitHub Desktop.
Save claudiosanches/85aef11cd81049246784 to your computer and use it in GitHub Desktop.
WooCommerce Extra Checkout Fields for Brazil - Neighborhood required
<?php
function custom_wcbcf_billing_fields( $fields ) {
$fields['billing_neighborhood']['required'] = true;
return $fields;
}
add_filter( 'wcbcf_billing_fields', 'custom_wcbcf_billing_fields' );
function custom_wcbcf_shipping_fields( $fields ) {
$fields['shipping_neighborhood']['required'] = true;
return $fields;
}
add_filter( 'wcbcf_shipping_fields', 'custom_wcbcf_shipping_fields' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment