WP Manifestindependent plugin directory
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.

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/suleman-se/headless-wp-api-pro/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Complete 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

  1. Download the plugin ZIP file
  2. Go to Plugins → Add New → Upload Plugin
  3. Choose the ZIP file and click Install Now
  4. Activate the plugin

Manual Installation

  1. Upload headless-wp-api-pro folder to /wp-content/plugins/
  2. 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