Last active
January 29, 2021 08:41
-
-
Save iamsathyaseelan/37bd19633aff76a438818c7be340637c to your computer and use it in GitHub Desktop.
sync email when email found
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
<?php | |
add_action("wp_footer", function () { | |
if (is_checkout()) { | |
echo '<script>jQuery(document).ready(function ($) { | |
setTimeout(function () { | |
let emailField = $("#billing_email"); | |
if (emailField.length > 0) { | |
emailField.trigger("change"); | |
} | |
}, 1000); | |
});</script>'; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment