Created
September 20, 2017 17:33
-
-
Save psaikali/35f60c3c578cfc6705ebd86f3527a332 to your computer and use it in GitHub Desktop.
Supprimer l'obligation de remplir le champ Téléphone sur la page Commande de WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Ne plus rendre le champ "Téléphone" obligatoire sur la page Commande de WooCommerce | |
*/ | |
function msk_wc_make_phone_field_not_required($address_fields, $country) { | |
$address_fields['billing_phone']['required'] = false; | |
return $address_fields; | |
} | |
add_filter('woocommerce_billing_fields', 'msk_wc_make_phone_field_not_required', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment