Skip to content

Instantly share code, notes, and snippets.

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 xlplugins/7397129729fb4e1f619529f0ed7ebfe9 to your computer and use it in GitHub Desktop.
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
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