From 58ea1db9fdc4fd74a457d6a27836fefc4235003c Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Wed, 16 Aug 2023 13:46:04 -0300 Subject: [PATCH 1/9] feature: add PDF receipt link --- .../FormDesigns/ClassicFormDesign/css/_receipt.scss | 2 +- src/DonationForms/resources/propTypes.ts | 1 + .../receipt/DonationConfirmationReceiptApp.tsx | 1 + .../registrars/templates/layouts/DonationReceipt.tsx | 6 +++++- src/DonationForms/resources/types.ts | 3 ++- .../Actions/GenerateConfirmationPageReceipt.php | 12 +++++++++++- 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss b/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss index 455c93ba54..f290c9df03 100644 --- a/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss +++ b/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss @@ -203,7 +203,7 @@ column-gap: 0.9375rem; align-items: center; text-decoration: none; - color: #fff; + color: var(--givewp-primary-color); &::after { display: inline-block; diff --git a/src/DonationForms/resources/propTypes.ts b/src/DonationForms/resources/propTypes.ts index f2ca249e01..297e842f20 100644 --- a/src/DonationForms/resources/propTypes.ts +++ b/src/DonationForms/resources/propTypes.ts @@ -194,6 +194,7 @@ export interface DonationReceiptProps { heading: string; description: string; donorDashboardUrl: string; + pdfReceiptLink: string; donorDetails: ReceiptDetail[]; donationDetails: ReceiptDetail[]; subscriptionDetails: ReceiptDetail[]; diff --git a/src/DonationForms/resources/receipt/DonationConfirmationReceiptApp.tsx b/src/DonationForms/resources/receipt/DonationConfirmationReceiptApp.tsx index c452c9886c..b6776ecba2 100644 --- a/src/DonationForms/resources/receipt/DonationConfirmationReceiptApp.tsx +++ b/src/DonationForms/resources/receipt/DonationConfirmationReceiptApp.tsx @@ -67,6 +67,7 @@ function DonationConfirmationReceiptApp() { heading={receipt.settings.heading} description={receipt.settings.description} donorDashboardUrl={receipt.settings.donorDashboardUrl} + pdfReceiptLink={receipt.settings.pdfReceiptLink} donorDetails={receipt.donorDetails} donationDetails={prepareDetails(receipt.donationDetails)} subscriptionDetails={prepareDetails(receipt.subscriptionDetails)} diff --git a/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx b/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx index 87d1756f79..bc5523fd22 100644 --- a/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx +++ b/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx @@ -19,7 +19,7 @@ const SecureBadge = () => { * * @since 3.0.0 */ -const Details = ({id, heading, details}: { id: string; heading: string; details: ReceiptDetail[] }) => +const Details = ({id, heading, details}: {id: string; heading: string; details: ReceiptDetail[]}) => details?.length > 0 && (

{heading}

@@ -43,11 +43,13 @@ export default function DonationReceipt({ heading, description, donorDashboardUrl, + pdfReceiptLink, donorDetails, donationDetails, subscriptionDetails, additionalDetails, }: DonationReceiptProps) { + console.log('pdfReceiptLink: ', pdfReceiptLink); return (
@@ -74,6 +76,8 @@ export default function DonationReceipt({
+ + {__('Go to my Donor Dashboard', 'give')} diff --git a/src/DonationForms/resources/types.ts b/src/DonationForms/resources/types.ts index 5f3acf56d1..8ad069dc71 100644 --- a/src/DonationForms/resources/types.ts +++ b/src/DonationForms/resources/types.ts @@ -1,5 +1,5 @@ import type {FC} from 'react'; -import {FormSettings} from "@givewp/form-builder/types"; +import {FormSettings} from '@givewp/form-builder/types'; /** * Used for a single currency. The amount is an integer in the smallest unit of the currency. @@ -57,6 +57,7 @@ export interface DonationConfirmationReceiptServerExports { description: string; currency: string; donorDashboardUrl: string; + pdfReceiptLink: string; }; donorDetails: ReceiptDetail[]; donationDetails: ReceiptDetail[]; diff --git a/src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php b/src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php index d8209e19d4..9e1f565820 100644 --- a/src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php +++ b/src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php @@ -171,7 +171,7 @@ private function fillAdditionalDetails(DonationReceipt $receipt) ) ); } - + if ($receipt->donation->anonymous) { $receipt->additionalDetails->addDetail( new ReceiptDetail( @@ -252,6 +252,16 @@ private function fillSettings(DonationReceipt $receipt) $receipt->settings->addSetting('currency', $receipt->donation->amount->getCurrency()->getCode()); $receipt->settings->addSetting('donorDashboardUrl', get_permalink(give_get_option('donor_dashboard_page'))); + + if (function_exists('give_pdf_receipts')) { + $link = sprintf( + '%2$s', + give_pdf_receipts()->engine->get_pdf_receipt_url($receipt->donation->id), + give_pdf_receipts_download_pdf_text(false), + give_pdf_receipts_download_pdf_text(false) + ); + $receipt->settings->addSetting('pdfReceiptLink', $link); + } } /** From 8c1043a1868a389fa64ce684bb120473630d5a6d Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Fri, 18 Aug 2023 14:05:11 -0300 Subject: [PATCH 2/9] refactor: check if pdf link exist before try to use it --- .../resources/registrars/templates/layouts/DonationReceipt.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx b/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx index 2eb917109e..8eab942602 100644 --- a/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx +++ b/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx @@ -75,7 +75,7 @@ export default function DonationReceipt({
- + {pdfReceiptLink && } {__('Go to my Donor Dashboard', 'give')} From 9bc77bb5cc44bc5541e78d7ee59fdc6626b3ad4a Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Fri, 18 Aug 2023 14:06:06 -0300 Subject: [PATCH 3/9] refactor: remove console message --- .../resources/registrars/templates/layouts/DonationReceipt.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx b/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx index 8eab942602..05be1bc07f 100644 --- a/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx +++ b/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx @@ -48,7 +48,6 @@ export default function DonationReceipt({ subscriptionDetails, additionalDetails, }: DonationReceiptProps) { - console.log('pdfReceiptLink: ', pdfReceiptLink); return (
From 35381a7aad8d027d1dab31ebb176ef747abffab6 Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Mon, 21 Aug 2023 15:10:10 -0300 Subject: [PATCH 4/9] feature: add PDF link hook --- .../Actions/GenerateConfirmationPageReceipt.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php b/src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php index df0319a07e..68363b470f 100644 --- a/src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php +++ b/src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php @@ -250,15 +250,10 @@ private function fillSettings(DonationReceipt $receipt) $receipt->settings->addSetting('currency', $receipt->donation->amount->getCurrency()->getCode()); $receipt->settings->addSetting('donorDashboardUrl', get_permalink(give_get_option('donor_dashboard_page'))); - if (function_exists('give_pdf_receipts')) { - $link = sprintf( - '%2$s', - give_pdf_receipts()->engine->get_pdf_receipt_url($receipt->donation->id), - give_pdf_receipts_download_pdf_text(false), - give_pdf_receipts_download_pdf_text(false) - ); - $receipt->settings->addSetting('pdfReceiptLink', $link); - } + $receipt->settings->addSetting( + 'pdfReceiptLink', + apply_filters('givewp_confirmation_page_receipt_settings_pdfReceiptLink', '', $receipt) + ); } /** From 7920021f23b1b91b973b145eb063f9ab37289b50 Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Mon, 21 Aug 2023 17:02:49 -0300 Subject: [PATCH 5/9] fix: add new setting to tests with failures --- tests/Unit/Framework/Receipts/TestDonationReceipt.php | 2 ++ tests/Unit/Framework/Receipts/TestDonationReceiptBuilder.php | 3 ++- .../Framework/Receipts/TestGenerateConfirmationPageReceipt.php | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/Unit/Framework/Receipts/TestDonationReceipt.php b/tests/Unit/Framework/Receipts/TestDonationReceipt.php index f10fdd6a7c..6316de3894 100644 --- a/tests/Unit/Framework/Receipts/TestDonationReceipt.php +++ b/tests/Unit/Framework/Receipts/TestDonationReceipt.php @@ -60,6 +60,7 @@ public function testToArrayReturnsExpectedArrayShape() $receipt = new DonationReceipt($donation); $receipt->settings->addSetting('currency', $receipt->donation->amount->getCurrency()->getCode()); $receipt->settings->addSetting('donorDashboardUrl', get_permalink(give_get_option('donor_dashboard_page'))); + $receipt->settings->addSetting('pdfReceiptLink', ''); $receipt->donorDetails->addDetails($donorDetails->getDetails()); $receipt->donationDetails->addDetails($donationDetails->getDetails()); @@ -69,6 +70,7 @@ public function testToArrayReturnsExpectedArrayShape() 'settings' => [ 'currency' => $receipt->donation->amount->getCurrency()->getCode(), 'donorDashboardUrl' => get_permalink(give_get_option('donor_dashboard_page')), + 'pdfReceiptLink' => '', ], 'donorDetails' => $donorDetails->toArray(), 'donationDetails' => $donationDetails->toArray(), diff --git a/tests/Unit/Framework/Receipts/TestDonationReceiptBuilder.php b/tests/Unit/Framework/Receipts/TestDonationReceiptBuilder.php index 40c08b0598..8291db95d7 100644 --- a/tests/Unit/Framework/Receipts/TestDonationReceiptBuilder.php +++ b/tests/Unit/Framework/Receipts/TestDonationReceiptBuilder.php @@ -82,7 +82,7 @@ public function testToConfirmationPageShouldReturnDonationReceipt() ) ); } - + if ($receipt->donation->anonymous) { $additionalDetails->addDetail( new ReceiptDetail( @@ -100,6 +100,7 @@ public function testToConfirmationPageShouldReturnDonationReceipt() 'description' => $description, 'currency' => $receipt->donation->amount->getCurrency()->getCode(), 'donorDashboardUrl' => get_permalink(give_get_option('donor_dashboard_page')), + 'pdfReceiptLink' => '', ]; diff --git a/tests/Unit/Framework/Receipts/TestGenerateConfirmationPageReceipt.php b/tests/Unit/Framework/Receipts/TestGenerateConfirmationPageReceipt.php index 1762bcff73..8964596ba0 100644 --- a/tests/Unit/Framework/Receipts/TestGenerateConfirmationPageReceipt.php +++ b/tests/Unit/Framework/Receipts/TestGenerateConfirmationPageReceipt.php @@ -101,6 +101,7 @@ public function testShouldGenerateReceiptForOneTimeDonation() 'description' => $description, 'currency' => $receipt->donation->amount->getCurrency()->getCode(), 'donorDashboardUrl' => get_permalink(give_get_option('donor_dashboard_page')), + 'pdfReceiptLink' => '', ]; $this->assertSame( @@ -232,6 +233,7 @@ public function testShouldGenerateReceiptForRecurringDonation() 'description' => $description, 'currency' => $receipt->donation->amount->getCurrency()->getCode(), 'donorDashboardUrl' => get_permalink(give_get_option('donor_dashboard_page')), + 'pdfReceiptLink' => '', ]; $this->assertSame( From 86c9afe9e2d27fbd02202b8411a540e43fedcb81 Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Tue, 22 Aug 2023 11:11:11 -0300 Subject: [PATCH 6/9] refactor: update pdf link style --- .../ClassicFormDesign/css/_receipt.scss | 44 +++++++++++-------- .../templates/layouts/DonationReceipt.tsx | 2 +- .../resources/styles/components/_receipt.scss | 43 ++++++++++-------- 3 files changed, 52 insertions(+), 37 deletions(-) diff --git a/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss b/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss index f290c9df03..acf2d061d6 100644 --- a/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss +++ b/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss @@ -173,11 +173,37 @@ .receipt-footer { display: flex; justify-content: space-between; + flex-direction: column; align-items: center; margin-block-start: 2rem; padding-block-end: fn.scaleBetween(1.5rem, 3.625rem); padding-inline: fn.scaleBetween(1.25rem, 4.25rem); + + #give-pdf-receipt-link, + #give-pdf-receipt-link:visited { + display: flex; + cursor: pointer; + text-decoration: none; + font-weight: 600; + width: fit-content; + border: thin solid var(--givewp-primary-color); + color: var(--givewp-primary-color); + padding: 1.2rem; + margin-bottom: 2rem; + border-radius: 0.2rem; + + &::before { + display: inline-block; + content: '\f1c1'; + font-family: 'Font Awesome 6 Free'; + font-weight: 900; + font-size: 1.625rem; + line-height: 1; + margin-right: 0.5rem; + } + } + .donor-dashboard-link { color: var(--givewp-primary-color); @@ -196,24 +222,6 @@ padding-inline: 1.6875rem; } } - - #give-pdf-receipt-link, - #give-pdf-receipt-link:visited { - display: flex; - column-gap: 0.9375rem; - align-items: center; - text-decoration: none; - color: var(--givewp-primary-color); - - &::after { - display: inline-block; - content: '\f1c1'; - font-family: 'Font Awesome 6 Free'; - font-weight: 900; - font-size: 1.625rem; - line-height: 1; - } - } } .givewp-layouts-receipt { diff --git a/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx b/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx index 05be1bc07f..797cae2620 100644 --- a/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx +++ b/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx @@ -74,7 +74,7 @@ export default function DonationReceipt({
- {pdfReceiptLink && } + {pdfReceiptLink && } {__('Go to my Donor Dashboard', 'give')} diff --git a/src/DonationForms/resources/styles/components/_receipt.scss b/src/DonationForms/resources/styles/components/_receipt.scss index f99b06cb04..681e707421 100644 --- a/src/DonationForms/resources/styles/components/_receipt.scss +++ b/src/DonationForms/resources/styles/components/_receipt.scss @@ -176,11 +176,36 @@ .receipt-footer { display: flex; justify-content: space-between; + flex-direction: column; align-items: center; margin-block-start: 2rem; padding-block-end: 1.5rem; padding-inline: 1.25rem; + #give-pdf-receipt-link, + #give-pdf-receipt-link:visited { + display: flex; + cursor: pointer; + text-decoration: none; + font-weight: 600; + width: fit-content; + border: thin solid var(--givewp-primary-color); + color: var(--givewp-primary-color); + padding: 1.2rem; + margin-bottom: 2rem; + border-radius: 0.2rem; + + &::before { + display: inline-block; + content: '\f1c1'; + font-family: 'Font Awesome 6 Free'; + font-weight: 900; + font-size: 1.625rem; + line-height: 1; + margin-right: 0.5rem; + } + } + .donor-dashboard-link { color: var(--givewp-primary-color); @@ -199,24 +224,6 @@ padding-inline: 1.6875rem; } } - - #give-pdf-receipt-link, - #give-pdf-receipt-link:visited { - display: flex; - column-gap: 0.9375rem; - align-items: center; - text-decoration: none; - color: #fff; - - &::after { - display: inline-block; - content: '\f1c1'; - font-family: 'Font Awesome 6 Free'; - font-weight: 900; - font-size: 1.625rem; - line-height: 1; - } - } } .givewp-layouts-receipt { From 7ea613860cb865f17a0d6693ba0cd439a680c36b Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Tue, 22 Aug 2023 17:03:05 -0300 Subject: [PATCH 7/9] refactor: remove arrow from donor dashboard link --- .../resources/registrars/templates/layouts/DonationReceipt.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx b/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx index 797cae2620..6cb0226f7a 100644 --- a/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx +++ b/src/DonationForms/resources/registrars/templates/layouts/DonationReceipt.tsx @@ -78,7 +78,6 @@ export default function DonationReceipt({ {__('Go to my Donor Dashboard', 'give')} -
From b837cf06b85b94c968895c80b22c6eb0f83e5f0e Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Tue, 22 Aug 2023 17:05:43 -0300 Subject: [PATCH 8/9] refactor: update pdf link style --- .../ClassicFormDesign/css/_receipt.scss | 29 ++++++++++--------- .../resources/styles/components/_receipt.scss | 27 ++++++++--------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss b/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss index acf2d061d6..c8cde72dae 100644 --- a/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss +++ b/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss @@ -170,6 +170,7 @@ } } + .receipt-footer { display: flex; justify-content: space-between; @@ -179,7 +180,6 @@ padding-block-end: fn.scaleBetween(1.5rem, 3.625rem); padding-inline: fn.scaleBetween(1.25rem, 4.25rem); - #give-pdf-receipt-link, #give-pdf-receipt-link:visited { display: flex; @@ -187,33 +187,34 @@ text-decoration: none; font-weight: 600; width: fit-content; - border: thin solid var(--givewp-primary-color); - color: var(--givewp-primary-color); - padding: 1.2rem; - margin-bottom: 2rem; + padding: 0.75rem 2rem 0.75rem 2rem; + margin-top: 1.5rem; + margin-bottom: 1.75rem; border-radius: 0.2rem; + border: thin solid var(--givewp-primary-color); + background-color: var(--givewp-primary-color); + color: #fff; &::before { display: inline-block; content: '\f1c1'; font-family: 'Font Awesome 6 Free'; font-weight: 900; - font-size: 1.625rem; + font-size: 1.25rem; line-height: 1; margin-right: 0.5rem; } } - .donor-dashboard-link { + #give-pdf-receipt-link:hover { + background-color: #fff; color: var(--givewp-primary-color); + } - > i { - margin-inline-start: 0.25rem; - transform: translateY(0.18em); - font-size: 1.5rem; - text-decoration: none; - line-height: 0.5; - } + .donor-dashboard-link { + color: var(--givewp-primary-color); + text-decoration: underline; + font-weight: 400; } .download-btn { diff --git a/src/DonationForms/resources/styles/components/_receipt.scss b/src/DonationForms/resources/styles/components/_receipt.scss index 681e707421..607e84d6c2 100644 --- a/src/DonationForms/resources/styles/components/_receipt.scss +++ b/src/DonationForms/resources/styles/components/_receipt.scss @@ -189,33 +189,34 @@ text-decoration: none; font-weight: 600; width: fit-content; - border: thin solid var(--givewp-primary-color); - color: var(--givewp-primary-color); - padding: 1.2rem; - margin-bottom: 2rem; + padding: 0.75rem 2rem 0.75rem 2rem; + margin-top: 1.5rem; + margin-bottom: 1.75rem; border-radius: 0.2rem; + border: thin solid var(--givewp-primary-color); + background-color: var(--givewp-primary-color); + color: #fff; &::before { display: inline-block; content: '\f1c1'; font-family: 'Font Awesome 6 Free'; font-weight: 900; - font-size: 1.625rem; + font-size: 1.25rem; line-height: 1; margin-right: 0.5rem; } } - .donor-dashboard-link { + #give-pdf-receipt-link:hover { + background-color: #fff; color: var(--givewp-primary-color); + } - > i { - margin-inline-start: 0.25rem; - transform: translateY(0.18em); - font-size: 1.5rem; - text-decoration: none; - line-height: 0.5; - } + .donor-dashboard-link { + color: var(--givewp-primary-color); + text-decoration: underline; + font-weight: 400; } .download-btn { From 75529f1d06d0f8e6c67d933209bc5963e95237eb Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Wed, 23 Aug 2023 09:34:12 -0300 Subject: [PATCH 9/9] refactor: invert hover color on pdf download link --- .../FormDesigns/ClassicFormDesign/css/_receipt.scss | 9 +++++---- .../resources/styles/components/_receipt.scss | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss b/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss index c8cde72dae..d50f48cd22 100644 --- a/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss +++ b/src/DonationForms/FormDesigns/ClassicFormDesign/css/_receipt.scss @@ -192,8 +192,9 @@ margin-bottom: 1.75rem; border-radius: 0.2rem; border: thin solid var(--givewp-primary-color); - background-color: var(--givewp-primary-color); - color: #fff; + background-color: #fff; + color: var(--givewp-primary-color); + &::before { display: inline-block; @@ -207,8 +208,8 @@ } #give-pdf-receipt-link:hover { - background-color: #fff; - color: var(--givewp-primary-color); + background-color: var(--givewp-primary-color); + color: #fff; } .donor-dashboard-link { diff --git a/src/DonationForms/resources/styles/components/_receipt.scss b/src/DonationForms/resources/styles/components/_receipt.scss index 607e84d6c2..bc691ce11f 100644 --- a/src/DonationForms/resources/styles/components/_receipt.scss +++ b/src/DonationForms/resources/styles/components/_receipt.scss @@ -194,8 +194,9 @@ margin-bottom: 1.75rem; border-radius: 0.2rem; border: thin solid var(--givewp-primary-color); - background-color: var(--givewp-primary-color); - color: #fff; + background-color: #fff; + color: var(--givewp-primary-color); + &::before { display: inline-block; @@ -209,8 +210,8 @@ } #give-pdf-receipt-link:hover { - background-color: #fff; - color: var(--givewp-primary-color); + background-color: var(--givewp-primary-color); + color: #fff; } .donor-dashboard-link {