PMPro Donations v3.0 — bug fixes, enhancements, new features#93
PMPro Donations v3.0 — bug fixes, enhancements, new features#93flintfromthebasement wants to merge 8 commits intostrangerstudios:devfrom
Conversation
The (double) cast alias is deprecated in PHP 8.5. Replace all 6 occurrences with the canonical (float) cast. Zero behavioral change. Closes strangerstudios#90
When a free membership level has donations enabled with a min_price > 0 or dropdown prices containing numeric values, mark the level as non-free so payment gateway fields render on checkout. Also adds validation requiring a donation amount for free levels with a minimum donation configured. Closes strangerstudios#84
Rewrite donation-only checkout flow to use PMPro API instead of raw SQL. Store user's previous levels before checkout, then restore after checkout using pmpro_cancelMembershipLevel() + pmpro_changeMembershipLevel(). Adds level group awareness so the correct level is restored when multiple groups exist. Also suppresses the misleading "your membership will be removed" message on donation-only checkout via gettext filter. Closes strangerstudios#85
Includes: - Fix donation amount storage for Pay by Check + whitespace (ticket 04) - Built-in donations report with filtering and CSV export (ticket 05) - Donor note field at checkout with email integration (ticket 06) - Admin donation amount field on order edit + Add Member (ticket 07) - Donation amount button tiles UI at checkout (ticket 08) - Cover processing fees checkbox at checkout (ticket 09) - Guest donations without account creation (ticket 10) - Donation reminder emails on configurable schedule (ticket 11) - Donation-only level experience overhaul (ticket 12) - Per-level email and confirmation template overrides (ticket 13) - Static analysis / QA verification (ticket 14) Code generated by homurai (v0.8.0-beta.9). Revision pass pending.
- Fix plugin header version (2.2 → 2.3) and readme.txt stable tag - Add v2.3 changelog to readme.txt - Fix i18n: email string replacements now use __() with PMPro core text domain so they work on non-English sites - Fix JS toggle bug: toggling "Enable Donations" now re-applies sub-toggle states (note label, cover fees, display mode, guest) - Suppress cancellation emails during donation-only level swap to prevent confusing "membership cancelled" emails during donations - Add error_log() if pmpro_changeMembershipLevel() fails during level restoration - Replace deprecated JS substr() with substring() - Fix add_filter arg count on pmprodon_filter_guest_donor_email
|
The “guest checkout” isn’t really a guest checkout because a user is still created. If you try to donate again using that same email at checkout, it will fail because a user already exists with that email. So this feature is more of a “streamlined checkout”. As a result, I feel like this is a feature that is not just donations-specific, but useful for all of PMPro and something that we’ve talked about in the past. Should “streamlined checkout” be more of a core feature then? Maybe advanced settings that apply globally, and level-specific overrides for donations levels and such? It just feels like if we build this feature into donations, it’s eventually going to be generalized especially since we already have code recipes for this type of feature |
Overview
This branch contains all v3.0 work across three phases: bug fixes, enhancements, and ideas meeting features.
What's Included
Bug Fixes
(double)casts with(float)for PHP 8.5 compatibilityMerged PRs
Enhancements (TICKETS 04–07)
Ideas Meeting Features (TICKETS 08–14)
!!donation!!and!!donation_note!!variablesHardening
How to Test
Notes
dev