Skip to content

Commit

Permalink
Revert "AB test Amazon Pay (#6374)" (#6407)
Browse files Browse the repository at this point in the history
This reverts commit 7b72aca.
  • Loading branch information
GHaberis authored Oct 14, 2024
1 parent 1be9e3c commit 8d9681b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,12 @@ function PaymentMethodSelectorContainer({
(state) => state.page.checkoutForm.payment.paymentMethod,
);

const { abParticipations } = useContributionsSelector(
(state) => state.common,
);

const availablePaymentMethods = getValidPaymentMethods(
contributionType,
countryId,
countryGroupId,
);

if (abParticipations.amazonPay === 'variant') {
const index = availablePaymentMethods.indexOf('AmazonPay');
if (index > -1) {
// Only splice availablePaymentMethods when AmazonPay is found
availablePaymentMethods.splice(index, 1);
}
}

function onPaymentMethodEvent(
event: 'select' | 'render',
paymentMethod: PaymentMethod,
Expand Down
34 changes: 1 addition & 33 deletions support-frontend/assets/helpers/abTests/abtestDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,38 +166,6 @@ export const tests: Tests = {
referrerControlled: false, // ab-test name not needed to be in paramURL
seed: 4,
targetPage: pageUrlRegexes.contributions.allLandingPagesAndThankyouPages,
excludeCountriesSubjectToContributionsOnlyAmounts: true,
},
amazonPay: {
variants: [
{
id: 'control',
},
{
id: 'variant',
},
],
audiences: {
US: {
offset: 0,
size: 1,
},
},
canRun: () => {
/**
* Only allocate users on old one-time
* checkout to this AB test.
*/
const urlSearchParams = new URLSearchParams(window.location.search);
const selectedContributionType = urlSearchParams.get(
'selected-contribution-type',
);
return selectedContributionType === 'one_off';
},
isActive: true,
referrerControlled: false, // ab-test name not needed to be in paramURL
seed: 5,
targetPage: pageUrlRegexes.contributions.allLandingPagesAndThankyouPages,
excludeCountriesSubjectToContributionsOnlyAmounts: true,
excludeCountriesSubjectToContributionsOnlyAmounts: false,
},
};

0 comments on commit 8d9681b

Please sign in to comment.