Skip to content

Instantly share code, notes, and snippets.

@lmartins
Created November 25, 2014 22:38
Show Gist options
  • Save lmartins/ab5564c3b38fc2f6360f to your computer and use it in GitHub Desktop.
Save lmartins/ab5564c3b38fc2f6360f to your computer and use it in GitHub Desktop.
Phone number not required in WooCommerce checkout form
add_filter( 'woocommerce_billing_fields', 'wc_npr_filter_phone', 10, 1 );
function wc_npr_filter_phone( $address_fields ) {
$address_fields['billing_phone']['required'] = false;
return $address_fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment