PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 All 256 releases
← All changes | src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php +14 -10 4.16.3 → 4.17.0 View file →
@@ -333,11 +333,13 @@
333 333 return DonationForm::find($formId);
334 334 }
335 335
336 336 /**
337 + * @since 4.17.0 Declare the nullable parameter explicitly.
338 + * @since 4.16.8 Apply legacy tags before donor-supplied V3 tag values.
337 339 * @since 3.0.0
338 340 */
339 - protected function getHeading(DonationReceipt $receipt, DonationForm $donationForm = null): string
341 + protected function getHeading(DonationReceipt $receipt, ?DonationForm $donationForm = null): string
340 342 {
341 343 if (!$donationForm) {
342 344 $content = __("Hey {first_name}, thanks for your donation!", 'give');
343 345 } else {
@@ -343,18 +345,20 @@
343 345 } else {
344 346 $content = $donationForm->settings->receiptHeading;
345 347 }
346 348
347 - return $this->transformV2FormTags(
348 - (new DonationTemplateTags($receipt->donation, $content))->getContent(),
349 - $receipt->donation
350 - );
349 + return (new DonationTemplateTags(
350 + $receipt->donation,
351 + $this->transformV2FormTags($content, $receipt->donation)
352 + ))->getContent();
351 353 }
352 354
353 355 /**
356 + * @since 4.17.0 Declare the nullable parameter explicitly.
357 + * @since 4.16.8 Apply legacy tags before donor-supplied V3 tag values.
354 358 * @since 3.0.0
355 359 */
356 - protected function getDescription(DonationReceipt $receipt, DonationForm $donationForm = null): string
360 + protected function getDescription(DonationReceipt $receipt, ?DonationForm $donationForm = null): string
357 361 {
358 362 if (!$donationForm) {
359 363 $content = __(
360 364 "{first_name}, your contribution means a lot and will be put to good use in making a difference. We’ve sent your donation receipt to {email}.",
@@ -363,12 +367,12 @@
363 367 } else {
364 368 $content = $donationForm->settings->receiptDescription;
365 369 }
366 370
367 - return $this->transformV2FormTags(
368 - (new DonationTemplateTags($receipt->donation, $content))->getContent(),
369 - $receipt->donation
370 - );
371 + return (new DonationTemplateTags(
372 + $receipt->donation,
373 + $this->transformV2FormTags($content, $receipt->donation)
374 + ))->getContent();
371 375 }
372 376
373 377 /**
374 378 * @since 3.0.0