Dynamic Web Lab Pricing Widget
A lightweight custom Elementor widget that renders a dynamic pricing table from a public JSON endpoint.
by Md Abu Bakker Siddik · github.com/md-abu-bakker-siddik/starter-plugin
★ 0stars
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/md-abu-bakker-siddik/starter-plugin/archive/refs/heads/main.zipA lightweight custom Elementor widget that renders a dynamic pricing table from a public JSON endpoint.
Features
- Dynamic pricing plans fetched from remote JSON
- Elementor controls for:
- title toggle + table title
- currency symbol
- popular plan index
- cache TTL
- responsive columns + gap
- Transient-based caching for faster repeat loads
- Secure output escaping and sanitized data normalization
- Responsive and accessible frontend markup
Local Installation
- Copy this plugin folder into
wp-content/plugins/starter-plugin. - Activate Dynamic Web Lab Pricing Widget from WordPress admin.
- Open Elementor editor and drag DWL Pricing Table widget onto the page.
- Set
JSON Endpoint URLand configure controls from the widget panel.
JSON Shape
The widget supports these payload styles:
{
"plans": [
{ "name": "Starter", "price": "29", "features": ["1 Website", "Basic Support"] }
]
}
or:
{
"record": {
"plans": [
{ "name": "Starter", "price": "29", "features": ["1 Website", "Basic Support"] }
]
}
}
Testing
This repo includes one PHPUnit test for payload normalization:
tests/PricingDataTest.php
Run:
phpunit
Notes
- If remote JSON fails, widget uses safe fallback plans.
- Cache key includes endpoint + TTL to support different widget instances.