Architecture
How the EpassCard WordPress plugin connects membership, event, and gift card data to the EpassCard API.
Data flow
WordPress (membership / events / gift cards)
│
▼
EPC_Module (integration)
│ hooks: create, renew, status, reminders
▼
EPC_Pass_Service::sync_pass()
│ mapping + source values → API payload
▼
EPC_Api_Client → EpassCard REST API
│
▼
EPC_DB (epc_passes, epc_api_logs)
Key components
| Class | Role |
|---|---|
EPC_Plugin | Bootstrap, module registry |
EPC_Module_Loader | Load module files and classes |
EPC_Module | Abstract integration (mapping UI, hooks) |
EPC_Pass_Service | Create/update passes from mappings |
EPC_Api_Client | HTTP client, templates, pass CRUD |
EPC_DB | epc_passes table |
EPC_Api_Log | Request/response logging |
EPC_Pass_Email | wp_mail delivery |
EPC_Pass_Notifications | Push cron, dedupe, send helpers |
EPC_Frontend | My Account, shortcode |
EPC_Connection | Encrypted API key storage |
Pass identity
module— slug (e.g.memberpress,event_tickets,pw_gift_cards)source_id— integration record id (subscription, attendee, booking, gift card, etc.)entity_id— product / level / ticket / event iduser_id— WordPress user (when available)
Built-in modules
modules/module-memberpress.phpmodules/module-paid-memberships-pro.phpmodules/module-simple-membership.phpmodules/module-ultimate-membership-pro.phpmodules/module-woocommerce-subscriptions.phpmodules/module-event-tickets.phpmodules/module-events-manager.phpmodules/module-pw-gift-cards.phpmodules/module-yith-gift-cards.php
Prefixes
Functions epc_* · Classes EPC_* · Options/tables epc_*
Boot order
plugins_loaded (20) → EPC_Plugin::boot(): DB upgrade, API log, email, frontend, crons, admin menu, enabled modules.
Register custom modules on plugins_loaded priority 10 or earlier.
Push notification flow
MemberPress / WCS reminder hook Daily cron (UMP, PMPro, Simple Membership,
│ Event Tickets, Events Manager, PW, YITH)
│ │
▼ ▼
build_push_notification_copy()
│
▼
EPC_Pass_Notifications::send_for_pass()
│
▼
POST /send-pass-notification/{passUuid}