How wpwing-dev/wpwing-smart-wishlist-product-waitlist-for-woocommerce works
1. This is a WordPress/WooCommerce plugin, not a standalone app.
The shipped code lives under src/ and is activated through the main plugin bootstrap file src/wpwing-smart-wishlist-product-waitlist-for-woocommerce.php. Everything else in the repo is either supporting runtime code, build/dev tooling, or tests.
2. The plugin is split into four main runtime layers: Core, Admin, Frontend, and feature modules.
- Core/ handles lifecycle, persistence, settings, cron, GDPR, and deletion hooks.
- Admin/ contains WordPress dashboard pages and list tables.
- Frontend/ handles conditional CSS/JS loading.
- Wishlist/ and Waitlist/ contain the actual user-facing feature flows.
3. Core is the orchestration boundary.
Core/Plugin.php is the central boot sequence/singleton that wires hooks and loads the rest of the plugin. Activator.php creates data structures on activation, Settings.php wraps WordPress options, Database.php centralizes table naming, and Cron.php schedules cleanup tasks. GdprHandler.php and ProductDeleteHandler.php connect the plugin to WordPress compliance and product lifecycle events.
4. The plugin uses custom database tables instead of storing everything in post meta.
The README explicitly calls out “custom database tables for performance.” That means the key architectural boundary is between WordPress/WooCommerce native entities (products, users, sessions, options) and plugin-owned tables used for wishlist and waitlist records. This is important for diagramming because the plugin is not just a thin UI layer; it owns its own persistence model.
5. Wishlist and waitlist are separate feature pipelines with similar structure.
Each feature has:
- a frontend renderer,
- an AJAX controller,
- and a guest merge handler for logged-out users who later authenticate.
Wishlist lives in src/app/Wishlist/, waitlist in src/app/Waitlist/. This separation matters because they are related but independent data flows.
6. Frontend interaction is mostly AJAX-driven and uses small asset bundles.
assets/js/wpwing-wishlist.js and assets/js/wpwing-waitlist.js handle client-side requests. Frontend/Assets.php enqueues the shared CSS/JS only when needed, keeping the plugin lightweight. The frontend PHP templates in src/templates/ render the shortcode/UI markup that these scripts enhance.
7. The wishlist flow is centered on product intent capture.
FrontendWishlist.php renders the wishlist button/shortcode output, WishlistController.php processes toggle/check requests, and GuestMergeHandler.php merges guest selections into a user account after login. AdminWishlist.php provides an admin-side view of stored wishlist data.
8. The waitlist flow is centered on back-in-stock subscription and notification.
FrontendWaitlist.php renders the email capture form and shortcode output, WaitlistController.php handles join/leave actions and downstream notifications, and GuestMergeHandler.php preserves anonymous intent across login. The templates waitlist-form.php and waitlist-view.php define the markup boundary for this feature.
9. Admin functionality is operational, not content-authoring.
AdminMenu.php adds plugin pages to the WordPress dashboard, AdminSettings.php exposes settings screens, AdminWaitlist.php surfaces waitlist entries, and WelcomeNotice.php handles a one-time activation notice. This subsystem is for configuration and operational oversight rather than end-user shopping behavior.
10. The plugin integrates with WooCommerce and WordPress lifecycle events.
Key cross-cutting triggers are activation, product deletion, login/guest merge, cron, and GDPR export/erasure hooks. Those are the main edges where the plugin connects into the host platform, so an architecture diagram should show these as event-driven integrations rather than direct user-facing services.
11. Repository tooling is split cleanly from runtime code.
Root-level composer.json, Makefile, PHPCS/PHPStan config, PHPUnit, and Playwright are dev/test tooling. docker-compose.yml plus docker/ provide a local WordPress/PHP/Caddy environment. dist/ is the release artifact boundary, while tests/ cover unit and end-to-end behavior.
12. Net effect: one plugin, two customer-intent products, shared infrastructure.
The shared infrastructure is the important architectural idea: both wishlist and waitlist use the same plugin bootstrap, settings, assets pipeline, admin shell, and lifecycle handlers, while keeping their UI and controllers separate. That makes the diagram naturally split into a common core with two feature branches feeding a shared persistence layer.
Main entry points: Plugin.php Core plugin · Database.php Database · Assets.php Assets loader · wpwing-smart-wishlist-product-waitlist-for-woocommerce.php Plugin bootstrap
Components 25
Runtime
Plugin bootstrap and shared execution shell
- Plugin bootstrap · Main plugin file that loads the runtime
src/wpwing-smart-wishlist-product-waitlist-for-woocommerce.php
Core
Lifecycle, persistence, and host integrations
- Core plugin · Central boot sequence that wires hooks and loads subsystems
src/app/Core/Plugin.php - Activator · Creates plugin data structures on activation
src/app/Core/Activator.php - Settings · Encapsulates WordPress options and plugin settings
src/app/Core/Settings.php - Database · Centralizes custom table names and persistence access
src/app/Core/Database.php - Cron · Registers cleanup and maintenance jobs
src/app/Core/Cron.php - GDPR handler · Connects export and erasure flows to WordPress GDPR APIs
src/app/Core/GdprHandler.php - Product delete · Handles product deletion cleanup and related sync
src/app/Core/ProductDeleteHandler.php
Admin
WordPress dashboard surfaces
- Admin menu · Adds plugin pages to the WordPress admin
src/app/Admin/AdminMenu.php - Admin settings · Renders configuration screens in the dashboard
src/app/Admin/AdminSettings.php - Waitlist admin · Surfaces stored waitlist entries for operations
src/app/Admin/AdminWaitlist.php - Welcome notice · Shows the one-time onboarding notice after activation
src/app/Admin/WelcomeNotice.php
Frontend
Conditional asset loading
- Assets loader · Loads shared CSS and JS only when needed
src/app/Frontend/Assets.php - Templates · PHP view templates for wishlist and waitlist UI
src/templates - Public CSS · Shared public-facing styles
src/assets/css/wpwing-public.css - Wishlist JS · Client-side wishlist interactions and AJAX requests
src/assets/js/wpwing-wishlist.js - Waitlist JS · Client-side waitlist interactions and AJAX requests
src/assets/js/wpwing-waitlist.js
Wishlist
Wishlist feature pipeline
- Wishlist frontend · Renders wishlist button and shortcode output
src/app/Wishlist/FrontendWishlist.php - Wishlist controller · Processes wishlist toggle and check requests
src/app/Wishlist/WishlistController.php - Wishlist merge · Merges anonymous wishlist state after login
src/app/Wishlist/GuestMergeHandler.php - Wishlist admin · Displays wishlist data in the admin context
src/app/Wishlist/AdminWishlist.php
Waitlist
Waitlist feature pipeline
- Waitlist frontend · Renders waitlist form and shortcode output
src/app/Waitlist/FrontendWaitlist.php - Waitlist controller · Handles join, leave, and notification workflows
src/app/Waitlist/WaitlistController.php - Waitlist merge · Preserves anonymous waitlist intent across login
src/app/Waitlist/GuestMergeHandler.php
Tooling
Build, environment, and test support
- Build & QA · Composer, coding standards, static analysis, and test harnesses
Connections 31
- Plugin bootstrap → Core plugin: loads · Main plugin file initializes the core singleton
- Core plugin → Activator: activation · Registers activation-time setup
- Core plugin → Settings: config · Wires plugin settings and options
- Core plugin → Database: persistence · Uses plugin-owned table naming and storage boundaries
- Core plugin → Cron: schedules · Registers recurring maintenance tasks
- Core plugin → GDPR handler: compliance · Connects GDPR export and erasure handlers
- Core plugin → Product delete: hooks · Listens for product lifecycle cleanup events
- Core plugin → Admin menu: admin · Bootstraps dashboard navigation
- Core plugin → Admin settings: admin · Exposes configuration screens
- Core plugin → Waitlist admin: admin · Loads operational waitlist views
- Core plugin → Welcome notice: admin · Triggers the onboarding notice
- Core plugin → Assets loader: frontend · Registers conditional asset loading
- Core plugin → Wishlist frontend: feature · Initializes wishlist UI flow
- Core plugin → Wishlist controller: feature · Registers wishlist AJAX handling
- Core plugin → Wishlist merge: feature · Attaches guest-to-user merge logic
- Core plugin → Wishlist admin: admin · Connects wishlist operational view
- Core plugin → Waitlist frontend: feature · Initializes waitlist UI flow
- Core plugin → Waitlist controller: feature · Registers waitlist AJAX handling
- Core plugin → Waitlist merge: feature · Attaches guest-to-user merge logic
- Wishlist frontend → Templates: renders · Uses shared PHP templates for markup
- Waitlist frontend → Templates: renders · Uses shared PHP templates for markup
- Assets loader → Public CSS: enqueues · Loads shared styles when feature UI is present
- Assets loader → Wishlist JS: enqueues · Loads wishlist client bundle on demand
- Assets loader → Waitlist JS: enqueues · Loads waitlist client bundle on demand
- Wishlist controller → Database: reads/writes · Persists wishlist records in custom tables
- Waitlist controller → Database: reads/writes · Persists waitlist records in custom tables
- Wishlist merge → Database: merges · Reconciles guest wishlist state into user records
- Waitlist merge → Database: merges · Reconciles guest waitlist state into user records
- Admin settings → Settings: uses · Reads and updates plugin configuration
- Waitlist admin → Database: queries · Displays stored waitlist entries
- Build & QA → Plugin bootstrap: packages · Supports the shipped plugin artifact