Skip to content

Commit

Permalink
Merge pull request #6764 from guardian/pd/guardian-adlite-checkout-ch…
Browse files Browse the repository at this point in the history
…anges

Guardian Ad-Lite : Checkout Ts&Cs Update
  • Loading branch information
paul-daniel-dempsey authored Feb 11, 2025
2 parents 22960e7 + 2aae9fe commit e8f176d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export function StripeDisclaimer() {
<>
All card payments are powered by Stripe. Read the Stripe{' '}
<a href="https://stripe.com/privacy" target="_blank">
privacy policy
Privacy Policy
</a>{' '}
and{' '}
<a href="https://stripe.com/legal/end-users" target="_blank">
terms and conditions
Terms and conditions
</a>
.
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,13 @@ function TsAndCsRenewal({
export function TsAndCsFooterLinks({
countryGroupId,
amountIsAboveThreshold,
productKey,
}: {
countryGroupId: CountryGroupId;
amountIsAboveThreshold?: boolean;
productKey?: ActiveProductKey;
}) {
const inAdLite = productKey === 'GuardianAdLite';
const privacy = <a href={privacyLink}>Privacy Policy</a>;

const termsContributions = (
Expand All @@ -121,11 +124,14 @@ export function TsAndCsFooterLinks({

const terms = amountIsAboveThreshold
? termsSupporterPlus('Terms and Conditions')
: inAdLite
? termsGuardianAdLite('Terms')
: termsContributions;
const productNameSummary = inAdLite ? 'the Guardian Ad-Lite' : 'our';

return (
<div css={marginTop}>
By proceeding, you are agreeing to our {terms}.{' '}
By proceeding, you are agreeing to {productNameSummary} {terms}.{' '}
<p css={marginTop}>
To find out what personal data we collect and how we use it, please
visit our {privacy}.
Expand Down Expand Up @@ -215,11 +221,15 @@ export function PaymentTsAndCs({
);
}

const copyBelowThreshold = (countryGroupId: CountryGroupId) => {
const copyBelowThreshold = (
countryGroupId: CountryGroupId,
productKey: ActiveProductKey,
) => {
return (
<TsAndCsFooterLinks
countryGroupId={countryGroupId}
amountIsAboveThreshold={amountIsAboveThreshold}
productKey={productKey}
/>
);
};
Expand Down Expand Up @@ -284,7 +294,8 @@ export function PaymentTsAndCs({
{inAllAccessDigital &&
copyAboveThreshold(contributionType, productKey, promotion)}
{inAdLite && copyAdLite(contributionType, productKey)}
{(inSupport || inAdLite) && copyBelowThreshold(countryGroupId)}
{(inSupport || inAdLite) &&
copyBelowThreshold(countryGroupId, productKey)}
{inDigitalEdition && copyDigitalEdition()}
</FinePrint>
</div>
Expand Down

0 comments on commit e8f176d

Please sign in to comment.