Skip to content

Commit

Permalink
Merge branch 'develop' into fun/permissions-facade
Browse files Browse the repository at this point in the history
  • Loading branch information
jonwaldstein authored Dec 11, 2024
2 parents 4bef9d6 + fe74928 commit 31a3c3c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
17 changes: 17 additions & 0 deletions src/MultiFormGoals/ProgressBar/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
*
Expand Down
5 changes: 4 additions & 1 deletion src/MultiFormGoals/resources/views/progressbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down Expand Up @@ -32,7 +35,7 @@
</div>
<div part="stat-count" class="give-progress-bar-block__stat">
<div part="stat-count-value"><?php
echo esc_html($this->getDonationCount()); ?></div>
echo esc_html($this->getFormattedDonationCount()); ?></div>
<div part="stat-count-label"><?php
echo _n('donation', 'donations', $this->getDonationCount(), 'give'); ?></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public function boot()
/**
* Save PayPal merchant details
*
* @unreleased fix parsing email with special characters
* @since 2.32.0 Remove second argument from updateSellerAccessToken function.
* @since 2.25.0 Handle exception.
* @since 2.9.0
Expand All @@ -138,7 +139,7 @@ public function boot()
*/
private function savePayPalMerchantDetails()
{
$paypalGetData = wp_parse_args($_SERVER['QUERY_STRING']);
$paypalGetData = wp_parse_args(str_replace("+", rawurlencode("+"), $_SERVER['QUERY_STRING']));
$partnerLinkInfo = $this->settings->getPartnerLinkDetails();
$tokenInfo = $this->settings->getAccessToken();

Expand Down

0 comments on commit 31a3c3c

Please sign in to comment.