Created
May 15, 2018 17:18
-
-
Save plugin-republic/a3581887d5f5744459717534ee61e6da to your computer and use it in GitHub Desktop.
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
function cwc_login_redirect( $redirect, $user ) { | |
if( strpos( $redirect, 'wp-admin/admin-ajax.php' ) !== false ) { | |
$redirect = home_url(); | |
} | |
return $redirect; | |
} | |
add_filter( 'woocommerce_login_redirect', 'cwc_login_redirect', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment