Beskrivelse
Webalive Donation Premium (WADP) is a standalone donation plugin that uses MobilePay ePayment for one-off donations. It does not depend on WooCommerce.
Features (v0.1.0):
- Up to 5 configurable preset amounts. Empty slots are hidden in the form.
- Optional free-amount input with min/max.
- Optional donor fields: email (for receipt), phone (MobilePay), message.
- Optional "anonymous" checkbox — anonymous donors are shown as "Anonymous" on the public list.
- Full payment log in a dedicated DB table
{prefix}wadp_payments. - Public donor list shortcode/block with card layout (columns, colors, border radius, show amount/message toggles).
- Receipt email template with placeholders:
{name},{amount},{currency},{reference},{date},{message}. - Currency + VAT mode (exempt / inclusive) configurable in settings.
Shortcodes:
[wadp_donation_form]— donation form.[wadp_donation_list]— public donor list.
Gutenberg blocks:
- Donation Form (
wadp/donation-form) - Donation List (
wadp/donation-list)
Ændringslog
0.8.0
- Fix: Extended the empty-translation safety-net from v0.6.0 (receipt fields) to all plugin strings. Root cause was the same: a stale
.mo/.l10n.phpwith an emptymsgstrmade__()return an empty string, which then blanked out defaults like the form title, description, button labels, admin notices, etc. Added agettext/gettext_with_contextfilter scoped to thewa-donation-premiumtext-domain that returns the English source string whenever the translation resolves to an empty value. Existingtranslated_default()helper for receipt subject/body is kept as belt-and-suspenders.
0.7.0
- Admin UI: Widened all
.small-textinputs on the Donations settings and log pages to 90px, so multi-digit amounts (e.g. 10000) and card-column values fit comfortably. Loaded via a new scopedassets/admin.css— nothing bleeds into other admin pages.
0.6.0
- Fix: Even on a brand-new install (nothing saved yet), the receipt Subject / Body fields on the settings page could render empty. Root cause was the localized defaults — when a stale
.l10n.php/.mofile loaded an emptymsgstrfor these two strings, WordPress'translate()returned the empty translation as-is (instead of falling back to the source string), so the default itself became''. Fix: the defaults now use a small helper that always falls back to the English source text if__()returns empty, guaranteeing the fields (and the outgoing email) are never blank.
0.5.0
- Fix: Receipt email subject and body now fall back to the built-in defaults when the stored option is an empty string. Previously an empty saved value silently won over the default (because
wp_parse_argsonly fills missing keys, not empty ones), so both the settings form and the sent email showed blank subject/body. The sanitize step also refuses to store an empty subject/body — the field is reset to the default instead. Existing sites are self-healing on next settings-page load / next donation.
0.4.0
- i18n: The default receipt email body is now wrapped in
__()so it is picked up by the .pot extractor and can be translated per locale. Placeholders ({name},{amount},{currency},{reference},{date},{message}) remain identical across locales. Existing sites where the admin has already saved a custom body are unaffected — only fresh installs (and sites that reset the field) will see the localized default.
0.3.0
- New: Automatic import of Vipps/MobilePay credentials from WA Members Premium (WAMP). When the WADP settings page is opened and any of the MobilePay credential fields (Client ID, Client Secret, Subscription Key, MSN, Test mode) are still empty, WADP reads the corresponding
wam_premium_vipps_*options from WAMP and copies them into WADP. Fields that already have a value are never overwritten. An admin notice on the settings page tells you which keys were imported. A small "Import again from WA Members Premium" link lets you re-run the import at any time.
0.2.0
- New: MobilePay Login (opt-in in settings). When enabled, the payment is created with a
profileblock requesting the selected scopes (name, email, phone, address, birthdate). After authorization the plugin fetches userinfo via the MobilePay userinfo API and populates donor name, email, phone and address on the log row. Address is also stored as a compact single-line field for display and as full JSON in the row meta. - New: Donation form auto-simplifies when MobilePay Login is on — donor name/email/phone fields are hidden (data comes from MobilePay). Message + anonymous checkbox remain.
- New: If the donor declines the profile consent (or MobilePay returns no name), the donation is still saved but automatically flagged as anonymous on the public list.
- New: Admin donation log now shows the address column.
- Schema: added
donor_address VARCHAR(500)column to{prefix}wadp_payments(dbDelta auto-upgrade, DB version bumped to 2).
0.1.0
- Initial release: form (5 preset amounts + free amount), MobilePay ePayment integration, payment log, public donor list, receipt email, anonymous donations.