Skip to content

Commit

Permalink
doc: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinderk committed Aug 7, 2023
1 parent 0c2b643 commit 1423b1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assets/src/js/admin/paypal-commerce/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ window.addEventListener( 'DOMContentLoaded', function() {
const radioField = document.querySelector('input[name="paypal_donations_connection_account_type"]:checked');
radioField && ( connectionAccountType = radioField.value );

canOptInForAdvancedCardProcessing = givePayPalCommerce.countriesAvailableForAdvanceConnection.includes( countryCode )
&& givePayPalCommerce.accountTypes.includes( connectionAccountType );
// Modal will only open when admin available for both conneciton account types.
// So we only need to validate if admin selected any account type or not.
canOptInForAdvancedCardProcessing = givePayPalCommerce.accountTypes.includes( connectionAccountType );

// Exit if admin available for both conneciton account types but did not select any.
if(! canOptInForAdvancedCardProcessing){
Expand Down

0 comments on commit 1423b1a

Please sign in to comment.