Skip to content

Instantly share code, notes, and snippets.

@pablo-sg-pacheco
Created July 29, 2016 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pablo-sg-pacheco/31b238e06326161ed03b506dcf9e7bd8 to your computer and use it in GitHub Desktop.
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
//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