wp_logout function not executed

I also tested the code on a local sandbox WP and it worked as expected. As Howdy_McGee commented this is probably a conflict with 3rd party code. If disabling theme and plugins is not an option, you can try changing the priority of the actions – i.e. the third parameter to add_action(). By default priority … Read more

Redirect after sign up with woocommerce form with role choice [closed]

user_register hook fires immediately after a new user is registered. so you have to add action on this hook. You can add below example code in your active theme’s function file. Example : add_action( ‘user_register’, ‘redirect_user_based_on_role’, 10, 1 ); function redirect_user_based_on_role( $user_id ) { // Get the user object. $user = get_userdata( $user_id ); // … Read more

How to stop wordpress from redirecting from the post’s old slug after changing title and slug?

You need to provide a higher priority number than the default when removing hooks. If you leave it default there’s a chance that your remove_action is executed prior to the add_action( ‘template_redirect’, ‘wp_old_slug_redirect’ ) So, instead: remove_action( ‘template_redirect’, ‘wp_old_slug_redirect’, 20 ); You also need to prevent WP from saving the old slugs which can be … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)