A lightweight plugin that enables password reset via REST API for WordPress and WooCommerce users. Perfect for headless and mobile-first apps built with frameworks like Ionic, Angular, React Native, or Flutter.
- Upload the plugin folder to
/wp-content/plugins/
- Or install it via Plugins → Add New → Upload Plugin
- Activate the plugin from the Plugins menu in WordPress
To trigger a password reset request, send a GET request to the endpoint:
https://yourdomain.com/wp-json/wp/v2/users/lostpassword/[email protected]
✅ You can call this API from:
- Ionic / Angular mobile apps
- React Native / Flutter
- Postman or custom frontend
📧 If the user exists:
- A WooCommerce-style reset password email will be sent using:
WC_Email_Customer_Reset_Password
- ✅ Only sends email if user exists
- ❌ Does not expose user validity in the API response
- 🔐 Can be secured further using:
- Nonce
- Authentication tokens
- Custom keys or rate limiting
- Extends the REST API via
register_rest_route
- Uses core WordPress + WooCommerce password reset logic
- Returns:
true
if email sentfalse
ornull
if user not found
Included in the plugin:
register_rest_route( 'wp/v2', '/users/lostpassword/', array(
'methods' => 'GET',
'callback' => 'wp_retrieve_password_api',
) );
| Method | Endpoint | Description |
| ------ | ----------------------------------------------------------- | ----------------------------- |
| GET | `/wp-json/wp/v2/users/lostpassword/[email protected]` | Triggers password reset email |
wordpress password reset api
woocommerce lost password rest api
reset user password via rest
ionic angular wordpress password reset
flutter wordpress authentication reset password
headless wordpress password recovery
rest api for lost password mobile app
woocommerce jwt auth reset password
M A Hasan
🌐 https://hasan.online
If this plugin helped you:
- ⭐ Star the repository on GitHub
- 🔗 Share it with WordPress or mobile app developers
- 💡 Contribute with feedback or pull requests
Together, we make WordPress more mobile-friendly and developer-first 🚀