using Woocommerce, is it possible to Force a user to be Logged out directly after Checkout (IMPORTANT: I need to have 'Allow customers to create an account during checkout' ticked.)
I ask because by default a user purchases an online course and they get direct access to it despite not being verified by an Admin user.
The following will logout customer after checkout redirecting customer to shop page:
Code goes in function.php file of your active child theme (or active theme). Tested and work.
You can use logout function after checkout order