End-at-target goals (auto-close when target reached) and fit-to-window rewards menu overlay
- Core\GoalTargetPolicy; atomic close in the capture path; friendly 'goal reached' message - In-flight checkouts still capture; new orders for a closed goal are refused - Rewards menu overlay: card hugs content, text scales to the window, resize-aware, scroll only as a last resort Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1c6d93ad5f
commit
5ea1e1d273
9 files changed
+216
-19
No files matched your search
@@ -84,6 +84,9 @@ final class OrderValidator {
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public static function quote( array $input, array $goal, array $settings, FeeCalculator $fees, int $nowTs ): array {
|
||||
if ( 'complete' === ( $goal['status'] ?? '' ) ) {
|
||||
throw new ValidationException( 'goal_inactive', 'This goal is closed and no longer accepting donations. Thank you for your support!', 409 );
|
||||
}
|
||||
if ( ! self::goalIsOpen( $goal, $nowTs ) ) {
|
||||
throw new ValidationException( 'goal_inactive', 'This goal is not accepting donations.', 409 );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user