manifest / integrations / headless-wp-api-pro
Headless WP API Pro
Complete headless WordPress solution with CORS, JWT Authentication, Password Reset API, Newsletter Subscription, and WooCommerce Store API support.
by M. Suleman · github.com/suleman-se/headless-wp-api-pro · website
★ 1stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/suleman-se/headless-wp-api-pro/archive/refs/heads/main.zipComplete headless WordPress solution with CORS, JWT Authentication, Password Reset API, Newsletter Subscription, and WooCommerce Store API support.
Features
- ✅ JWT Authentication - Secure token-based authentication
- ✅ CORS Management - Properly configured Cross-Origin Resource Sharing
- ✅ Password Reset API - Complete password reset flow
- ✅ Newsletter Subscription - API endpoint with optional Mailchimp integration
- ✅ WooCommerce Store API Support - Cart-Token and Nonce headers
- ✅ Zero Dependencies - All-in-one solution
- ✅ Developer Friendly - Clean code, well-documented
Installation
Via WordPress Admin
- Download the plugin ZIP file
- Go to Plugins → Add New → Upload Plugin
- Choose the ZIP file and click Install Now
- Activate the plugin
Manual Installation
- Upload
headless-wp-api-profolder to/wp-content/plugins/ - Activate through WordPress admin
Configuration
Add to wp-config.php:
define('JWT_AUTH_SECRET_KEY', 'your-super-secret-key-here');
API Endpoints
JWT Authentication
POST /wp-json/jwt-auth/v1/token
Content-Type: application/json
{
"username": "user@example.com",
"password": "password123"
}
Forgot Password
POST /wp-json/wp/v2/users/forgot-password
Content-Type: application/json
{
"email": "user@example.com"
}
Reset Password
POST /wp-json/wp/v2/users/reset-password
Content-Type: application/json
{
"key": "reset_key",
"login": "username",
"password": "new_password"
}
Newsletter Subscription
POST /wp-json/wp/v2/subscribe
Content-Type: application/json
{
"email": "user@example.com"
}
Response:
{
"success": true,
"message": "Thank you for subscribing to our newsletter!"
}
Optional Mailchimp Integration:
Add to wp-config.php:
define('MAILCHIMP_API_KEY', 'your-api-key');
define('MAILCHIMP_LIST_ID', 'your-list-id');
Changelog
Version 2.1.0 (2025-12-03)
- Added: Newsletter subscription API endpoint (/wp/v2/subscribe)
- Added: Email storage for newsletter subscribers
- Added: Welcome email for new subscribers
- Added: Optional Mailchimp integration support
- Improved: Documentation with newsletter subscription examples
Version 2.0.1 (2024-11-27)
- Fixed: CORS headers now always include WooCommerce Store API headers (X-WC-Store-API-Nonce, Cart-Token)
- Fixed: Removed conditional logic that could prevent WooCommerce headers from being sent
- Improved: More reliable CORS configuration for headless WooCommerce implementations
See CHANGELOG.md for complete version history.
License
GPL-2.0-or-later