Donors who chose to be anonymous are shown as "Anonymous". Their name is never stored. Test donations are marked TEST and left out of the CSV and your totals.
';
echo '
Replay shows a donation\'s alert again on the Donation alerts overlay. The overlay must be open when you press it. Totals, timers and counters do not change.
';
Admin::close();
}
/** Only donations that may appear on stream: paid, and not held or rejected by moderation. */
public static function canReplay( array $row ): bool {
return 'completed' === ( $row['status'] ?? '' ) && 'approved' === ( $row['moderation'] ?? '' );
}
public static function handleReplay(): void {
Admin::guard( 'sg_replay_alert' );
$post = Admin::post_raw();
$id = isset( $post['donation_id'] ) ? absint( $post['donation_id'] ) : 0;
$row = $id ? Store::donationById( $id ) : null;
$ok = $row && self::canReplay( $row );
if ( $ok ) {
Replays::request( $id );
}
$back = wp_get_referer(); // keeps the current filter and page
Admin::redirect( $back ? $back : Admin::url( 'streamgoals-donations' ), $ok ? 'success' : 'error', $ok ? 'Alert sent again. Watch your alerts overlay.' : 'That donation cannot be replayed.' );
}
public static function renderModeration(): void {
Admin::open( 'Moderation' );
if ( ! Settings::get( 'moderate_messages' ) ) {
echo '
Message moderation is currently off in Settings, so new messages are shown without review. A donor name that trips the profanity filter is still held here, and anything else waiting below was submitted earlier.
';
}
echo '
Held donations stay out of alerts (and the public donor feed) until you approve them. Rejected ones are never shown. A donor name that trips the profanity filter is held here too; it is already masked (for example f***), and approving shows it masked. The donation itself still counts towards your goal, timer and counters either way.