Created
June 2, 2017 01:48
-
-
Save luizbills/e21708cbe92c010b1834e01a5a7723d6 to your computer and use it in GitHub Desktop.
Fazer o campo de número do endereço aceitar apenas números
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 | |
add_filter( 'woocommerce_checkout_fields' , 'lpb_change_address_number_field_input_type', 999 ); | |
function lpb_change_address_number_field_input_type ( $fields ) { | |
$fields['billing']['billing_number']['type'] = 'number'; | |
$fields['shipping']['shipping_number']['type'] = 'number'; | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment