Hold donations with flagged donor names for moderation; reconcile lost side effects (schema v6)
Test and Release / test (push) Successful in 1m28s
Test and Release / release (push) Successful in 7s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-15 17:07:32 -08:00
1 parent 473fe192cd
commit 353f7ca5be
16 files changed
+681 -41

No files matched your search

+6 -1
View File
@@ -12,6 +12,11 @@ final class Recorder {
* @return int[] ids of the tiers this call unlocked.
*/
public static function forDonation( int $donationId ): array {
return self::forDonationChecked( $donationId ) ?? array();
}
/** Same as forDonation() but null (instead of an empty list) when something failed. Never throws. @return int[]|null */
public static function forDonationChecked( int $donationId ): ?array {
try {
global $wpdb;
$row = $wpdb->get_row( $wpdb->prepare( 'SELECT id, goal_id, status FROM ' . $wpdb->prefix . 'sg_donations WHERE id = %d', $donationId ), ARRAY_A );
@@ -27,7 +32,7 @@ final class Recorder {
return $repo->markReached( $goalId, $raised, $donationId );
} catch ( \Throwable $e ) {
error_log( 'StreamGoals: tier unlock failed for donation ' . $donationId . ': ' . $e->getMessage() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
return array();
return null;
}
}
}