Created
June 22, 2020 18:18
-
-
Save dhirenpatel22/8b2e7e8863bd33af8d390e46a33ba298 to your computer and use it in GitHub Desktop.
After registration, logout the user and redirect to home page
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
function custom_registration_redirect() { | |
wp_logout(); | |
return home_url('/'); | |
} | |
add_action('woocommerce_registration_redirect', 'custom_registration_redirect', 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment