Log a user out once they are directed to the thank you page

By: P Galloway | Asked: 06/29/2022
ForumsCategory: How-toLog a user out once they are directed to the thank you page
P Galloway asked 2 years ago
A form is submitted and redirected to a thank you page. I need to log the user out without prompts once they land on the thank¬† you page.   Ideas?   Thank you!
1 Answers
Victor Font answered 2 years ago
I've never see this question asked before. WordPress has the wp_logout() function that will do what you want, but I don't know what hook you would use to call it because you want the logout done after the thank you page loads. By the time the thank you page loads, Formidable is finished with the entry process. You may have to research WordPress hooks that execute when a page loads.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right