Install
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/m-haris-dev/promotions-update/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Promotions Update WooCommerce Plugin
Description
Fetches mock API data and displays it in WordPress admin under a new "Promotions" menu. Optionally updates daily via cron.
Features
- Fetch data from API using
wp_remote_get - Display promotions in admin dashboard
- Optional daily cron update
- Modular class-based design
Installation
- Upload
promotions-updatefolder to/wp-content/plugins/. - Activate plugin from WordPress admin.
- Visit Promotions menu to view data.
Hooks Used
admin_menu→ create admin pagewp_remote_get→ fetch API safelywp_schedule_event→ schedule cron job
Notes
- Mock API: https://6912089152a60f10c8205b76.mockapi.io/test/ecommerce/TestData
- Admin displays
date,title,image,price,idin a table