diff --git a/src/MultiFormGoals/ProgressBar/Model.php b/src/MultiFormGoals/ProgressBar/Model.php index ea024438e2..23beb43e8b 100644 --- a/src/MultiFormGoals/ProgressBar/Model.php +++ b/src/MultiFormGoals/ProgressBar/Model.php @@ -161,6 +161,23 @@ public function getDonationCount(): int return $results->count; } + /** + * Get formatted number of donations + * + * @unreleased + */ + public function getFormattedDonationCount(): string + { + return give_format_amount( + $this->getDonationCount(), + [ + 'sanitize' => false, + 'decimal' => false, + 'currency' => false, + ] + ); + } + /** * Get formatted total remaining (ex: $75) * diff --git a/src/MultiFormGoals/resources/views/progressbar.php b/src/MultiFormGoals/resources/views/progressbar.php index ac27e0ab47..b487d1815e 100644 --- a/src/MultiFormGoals/resources/views/progressbar.php +++ b/src/MultiFormGoals/resources/views/progressbar.php @@ -2,6 +2,9 @@ /** * Multi-Form Goals block/shortcode template * Styles for this template are defined in 'blocks/multi-form-goals/common.scss' + * + * @unreleased Format the donation count + * * @var Give\MultiFormGoals\ProgressBar\Model $this */ @@ -32,7 +35,7 @@