Skip to content

Instantly share code, notes, and snippets.

@cryptexvinci
Created March 13, 2017 16:40
Show Gist options
  • Save cryptexvinci/5b11715998ad08720c25a43cf2382dd2 to your computer and use it in GitHub Desktop.
Save cryptexvinci/5b11715998ad08720c25a43cf2382dd2 to your computer and use it in GitHub Desktop.
Make the required checkout fields optional.
// WooCommerce Remove Required Checkout Fields
add_filter( 'woocommerce_checkout_fields' , 'custom_wc_checkout_fields_required' );
function custom_wc_checkout_fields_required( $fields ) {
$fields['billing']['billing_phone']['required'] = false;
return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment