Skip to content

Instantly share code, notes, and snippets.

@iamsathyaseelan
Last active January 29, 2021 08:41
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 iamsathyaseelan/37bd19633aff76a438818c7be340637c to your computer and use it in GitHub Desktop.
Save iamsathyaseelan/37bd19633aff76a438818c7be340637c to your computer and use it in GitHub Desktop.
sync email when email found
<?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