Tiered goals: ordered milestones with unlocks, tier-aware goal bar, TIER UNLOCKED alerts, next-unlock line
- Tiers\TierPolicy (pure), TierRepository (atomic reached marking), Tiers\Recorder hooked before close-at-target - Admin tiers screen; goal target derived from the final tier - Overlay goal widget shows Tier N of M and fills within the tier; alert pill; donate form 'Next unlock' - Installer DB_VERSION 4 (sg_goal_tiers) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
39840a20d7
commit
4c379a0245
20 files changed
+1089
-14
No files matched your search
@@ -93,6 +93,13 @@ final class DonationStore {
|
||||
} catch ( \Throwable $e ) {
|
||||
error_log( 'StreamGoals: Recorder failed for donation ' . $id . ': ' . $e->getMessage() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
|
||||
}
|
||||
// Goal tiers: unlock every tier this donation reaches. MUST run before the close-at-target check below
|
||||
// (the final tier's target is the goal target). Own try/catch; never throws, never delays a capture.
|
||||
try {
|
||||
\StreamGoals\Tiers\Recorder::forDonation( $id );
|
||||
} catch ( \Throwable $e ) {
|
||||
error_log( 'StreamGoals: tier unlock failed for donation ' . $id . ': ' . $e->getMessage() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
|
||||
}
|
||||
self::close_goal_if_target_reached( $id );
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user