Created
July 29, 2016 15:13
-
-
Save pablo-sg-pacheco/31b238e06326161ed03b506dcf9e7bd8 to your computer and use it in GitHub Desktop.
Remove campos invalidos no checkout do woocommerce. Útil quando se utiliza o plugin extra checkout fields for Brazil
This file contains hidden or 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
//Remove os campos invalidos do checkout | |
add_action('wp_footer', 'fixInvalidCheckoutFields', 999); | |
function fixInvalidCheckoutFields() { | |
if(is_checkout()){ | |
?> | |
<script> | |
jQuery(window).load(function(){ | |
jQuery('.form-row').removeClass('woocommerce-invalid woocommerce-invalid-required-field woocommerce-validated'); | |
}) | |
</script> | |
<?php | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment