Offer Stream
A wordpress plugin provide multiple plugin json offer publicly via rest api have option to setup offer for multiple plugins
by Iftakharul Islam · github.com/iftakharul-islam/plugin-offer-stream · website
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/iftakharul-islam/plugin-offer-stream/archive/refs/heads/main.zipA WordPress plugin that provides multiple plugin offers publicly via REST API with an admin UI to manage plugins and their offers.
Description
Offer Stream is a WordPress plugin that allows you to manage promotional offers for your plugins and expose them via a public REST API.
Features
- Plugin Management: Add, edit, and delete plugins in the system
- Offer Management: Add multiple offers for each plugin with detailed information
- Public REST API: Access all enabled offers via a public JSON API endpoint
- Admin UI: User-friendly interface to manage plugins and offers
- Enable/Disable Offers: Control which offers appear in the API
- Date-based Offers: Set start and end dates for each offer
- Caching: Built-in transient caching for optimal performance
Installation
- Upload the
plugin-offer-streamfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Navigate to 'Plugin Offers' in the WordPress admin menu to start managing your offers
Usage
Admin Interface
- Add Plugins: Go to Plugin Offers → Add Plugin to create a new plugin entry
- Manage Offers: Click "Manage Offers" next to any plugin to add/edit/delete offers
- Add Offers: Fill in the offer details including:
- Offer Key (unique identifier)
- Title and Content
- Start and End Dates
- Action URL and Button Text
- Image URL (optional)
- Enable/Disable status
API Endpoints
Get all active offers:
GET https://yoursite.com/wp-json/plugin-offer-stream/v1/offers
Get offer by plugin slug:
GET https://yoursite.com/wp-json/plugin-offer-stream/v1/offers/{slug}
API Response Format
[ { "plugin_slug": "wedocs", "image": "https://example.com/image.jpg", "key": "Holiday_Sale", "start_date": "2025-12-18 09:00:00", "end_date": "2025-12-31 12:00:00", "title": "Surprise Holiday Sale", "content": "Unlock all weDocs premium!", "action_url": "https://example.com/deal", "action_title": "Grab the Deal", "enable": true } ]
Frequently Asked Questions
What are the requirements?
WordPress 5.8 or higher and PHP 7.4 or higher.
Is the API public?
Yes, the REST API endpoint is publicly accessible without authentication.
Can I disable specific offers?
Yes, each offer has an enable/disable toggle. Only enabled offers appear in the API.
Changelog
1.0.0
- Initial release
- Plugin and offer management
- REST API endpoints
- Admin UI
- Caching support
Upgrade Notice
1.0.0
Initial release of Offer Stream.