Use general fixed fee if no specific assigned

This commit is contained in:
carmenmaymo 2025-02-07 15:35:22 +01:00
parent 97176b9fab
commit d6ddc1e289
No known key found for this signature in database
GPG key ID: 6023F686B0F3102E

View file

@ -27,10 +27,8 @@ const PricingTitleBadge = ( { item } ) => {
typeof infos[ itemKey ] === 'number'
? infos[ itemKey ].toFixed( 2 )
: infos[ itemKey ].percentage.toFixed( 2 );
let itemFixedAmount = infos[ itemKey ].fixedFee || 0;
if ( itemKey === 'checkout' || itemKey === 'plater' ) {
itemFixedAmount = infos.fixedFee[ storeCurrency ];
}
const itemFixedAmount =
infos[ itemKey ].fixedFee ?? infos.fixedFee[ storeCurrency ] ?? 0;
const fixedAmount = getFixedAmount(
storeCurrency,
infos.fixedFee,