I’m using WooCommerce to run an online store that sells access to restricted content on my site. I want to allow customers to create an account during checkout, so I have enabled this option in WooCommerce settings. However, I have noticed a problem with this feature. Customers can create an account without completing a purchase, which means they can access some parts of my site that are only for logged-in users, such as My Account page. They cannot see the restricted content, but they can still create spam accounts on my site. This is a security vulnerability that I want to fix.
How can I prevent customers from creating an account during checkout unless they complete a purchase successfully? Is there a way to configure WooCommerce settings or use a plugin to achieve this? I still want to offer account creation during checkout for legitimate customers who want to buy my products and access the restricted content.
I appreciate any help or suggestions on how to solve this issue. Thank you!