Automatic user account deletion for failed payments
-
I’m working on a website whereby users create accounts at checkout so that they can automatically start their LMS after purchase (a quick link is provided in the my-account page).
However, due to allowing customers to create accounts at checkout, if the customer is redirected to an external payment gateway such as PayPal/Partial.ly and doesn’t complete the purchase, a user account is still created that they can access.
Turning off the ability to create user accounts at checkout isn’t an option.
We’ve tried some workarounds (e.g. add different user roles (and access permissions) to users whose orders change to “Completed”) but this process of assigning a user role on Order Status isn’t 100% reliable. This method is also impacting some other plugins, so I’m finding myself having to go in and delete users manually each time they don’t make a payment, often creating a cookie conflict in WP Cerber if they try to pay again (as a user was created the first time around, when they didn’t pay).
Ideally, I’m looking to see if anyone knows of a plugin that can automatically delete WordPress User accounts if they haven’t made a purchase (i.e. it’s cancelled or failed in WooCommerce).
Or, even better, if there is a way to only provision a user account once an order is “Completed”.
The page I need help with: [log in to see the link]
- The topic ‘Automatic user account deletion for failed payments’ is closed to new replies.