Developer reference
Plugin identity #
- Plugin name: GiveBlocks Donation & Events Platform
- Slug:
giveblocks-donation-events-platform - Text domain:
giveblocks-donation-events-platform - Current documented version:
1.0.1 - Minimum WordPress:
6.0 - Minimum PHP:
7.4
Main directories #
donation-event-tickets.php— bootstrap, constants, activation, and version migration.includes/admin/— WordPress administrator controllers, views, scripts, styles, reports, imports, campaigns, and block registration.includes/public/— public forms, donor portal, receipts, check-in PWA, scripts, and styles.includes/class-det-db.php— plugin database access.includes/class-det-api-client.php— GiveBlocks Platform API client.includes/class-det-webhook-handler.php— local transaction/webhook processing.includes/class-det-email-templates.php— email templates and sanitization.includes/class-det-credentials.php— encrypted credential storage.includes/class-det-qr-helper.php— ticket QR URL generation.
The internal det filenames are legacy implementation names. Public hooks, storage, text domain, and current interfaces use the GiveBlocks prefix.
Registered blocks #
giveblocks-donation-events-platform/donation-formgiveblocks-donation-events-platform/event-ticketsgiveblocks-donation-events-platform/donor-dashboard
The deprecated combined checkout and older donation-event-tickets/* blocks are handled through a render compatibility layer rather than being exposed as current blocks.
Shortcodes #
giveblocks_donation_formgiveblocks_ticket_checkoutgiveblocks_donor_portal
Public routes #
/campaign/{campaign-key}//volunteer-checkin//volunteer-checkin.webmanifest/volunteer-checkin-sw.js
Legacy check-in URLs are retained where required for compatibility.
WordPress REST namespace #
giveblocks/v1
Routes include:
/webhook/create-payment-intent/send-magic-link/portal/cancel-subscription/portal/update-subscription/sync-checkins/checkin/guestlist/sandbox/confirm-payment/donor/history/portal/update-profile/receipt
Do not treat route existence as permission to call it directly. Routes use webhook signatures, donor sessions, check-in tokens, administrator permissions, payment mode restrictions, or other validation according to their purpose.
Database tables #
Tables use the active WordPress table prefix:
{prefix}giveblocks_campaigns{prefix}giveblocks_tickets{prefix}giveblocks_addons{prefix}giveblocks_donations{prefix}giveblocks_ticket_orders{prefix}giveblocks_ticket_items{prefix}giveblocks_order_addons{prefix}giveblocks_subscriptions
Use GiveBlocks_Db methods instead of writing new direct queries where a method exists.
Roles and capabilities #
- Capability:
giveblocks_checkin_tickets - Role:
giveblocks_volunteer
Administrators receive the check-in capability. The activation migration also preserves eligible legacy check-in access.
Platform API base URL #
Default:
https://api.giveblocks.net/v1
Development environments can override this with the GIVEBLOCKS_PLATFORM_API_URL constant.
Local credentials #
The site API key and webhook secret are stored through GiveBlocks_Credentials, which encrypts stored values using key material derived from the WordPress installation salts.
Webhook endpoint #
The WordPress webhook route is:
https://your-domain.example/wp-json/giveblocks/v1/webhook
The GiveBlocks Platform API signs callbacks using the claimed site’s webhook secret. Do not expose or manually edit this secret.
Service worker scope #
The check-in service worker is served from a top-level route so it can control the volunteer check-in application. PWA asset changes should include a cache-version change when needed.
Development and release checks #
Before packaging:
- Update the plugin header version.
- Update
GIVEBLOCKS_VERSION. - Update the readme Stable tag and changelog.
- Run PHP syntax checks.
- Run WordPress Plugin Check.
- Search for unescaped output, missing nonces, missing capability checks, and unprefixed declarations/storage.
- Verify the text domain matches the plugin slug.
- Confirm no secrets or development data are packaged.
- Confirm
platform-api,scratch,test-data,.git, and local configuration files are excluded. - Test activation on a clean WordPress installation.
- Test upgrade from the prior release.
- Test blocks and legacy saved content.
- Test live/test mode separation.
- Test the PWA after clearing its prior service worker and cache.