1 vote

window.location.href doesnt' work to redirect page

Your code only works on two conditions. Does not work any time neither of those two conditions are active. But the proper way to redirect in WP is with the wp_redirect() function: wp_redirect('https:/...
Rick Hellewell's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible