Last active
December 9, 2021 08:25
-
-
Save xlplugins/7397129729fb4e1f619529f0ed7ebfe9 to your computer and use it in GitHub Desktop.
remove all query string from address bar liek ?add-to-cart, after page load
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
add_action( 'wfacp_internal_css', function () { | |
?> | |
<script> | |
window.addEventListener('bwf_checkout_load', function () { | |
window.history.pushState(null, null, window.location.origin + window.location.pathname); | |
jQuery('.woocommerce-form-login [name="_wp_http_referer"]').val('') | |
}); | |
</script> | |
<?php | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment