Modify config defaults to better accommodate country-specific requirements

This commit is contained in:
Daniel Dudzic 2025-03-13 10:25:25 +01:00
parent 80a99c75d3
commit 22cd59d0f5
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
7 changed files with 101 additions and 61 deletions

View file

@ -1,20 +1,11 @@
import { Icon } from '@wordpress/components';
import data from '../../utils/data';
const PaymentMethodIcon = ( { icons, type } ) => {
const validIcon = Array.isArray( icons ) && icons.includes( type );
if ( validIcon || icons === 'all' ) {
return (
<Icon
icon={ data().getImage( 'icon-button-' + type + '.svg' ) }
className="ppcp--method-icon"
/>
);
}
return null;
};
const PaymentMethodIcon = ( { type } ) => (
<Icon
icon={ data().getImage( `icon-button-${ type }.svg` ) }
className="ppcp--method-icon"
/>
);
export default PaymentMethodIcon;