Last active
February 8, 2020 21:06
-
-
Save clifgriffin/5503ea4374c190288e71058d61b45fdf to your computer and use it in GitHub Desktop.
Change validation trigger for billing email field with Checkout for 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 | |
// Include in your theme's functions.php file or with your favorite snippets plugin | |
// Do NOT include the opening PHP tag above (<?php) | |
add_filter( | |
'woocommerce_checkout_fields', function( $fields ) { | |
// Change billing email validation trigger to focusout | |
$fields['billing']['billing_email']['custom_attributes']['data-parsley-trigger'] = 'focusout'; | |
return $fields; | |
}, 2000 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment