mollie / WooCommerce

Official Mollie extension for WooCommerce
https://wordpress.org/plugins/mollie-payments-for-woocommerce/
Other
131 stars 53 forks source link

Retrieve gateway icons from Mollie #812

Closed inpsyde-maticluznar closed 1 year ago

inpsyde-maticluznar commented 1 year ago

I changed the \Mollie\WooCommerce\PaymentMethods\AbstractPaymentMethod::getIconUrl method. It prioritises the image from API payment method. Icons will be loaded directly from the Mollie URL.

inpsyde-maticluznar commented 1 year ago

@mmaymo previous implementation was overriding card selector option. Last two commits fix that. When credit card selector is enabled, credit card icons are shown.

inpsyde-maticluznar commented 1 year ago

CSS fix. Payment icon size is limited to 32x24px.

inpsyde-maticluznar commented 1 year ago

@mmaymo

Payment method API image is now shown when the "Use API dynamic title and gateway logo" option is checked. We created two new filters for developers:

Programmatically control API title visibility for every payment method. apply_filters('mollie_wc_gateway_use_api_title', $value, $paymentMethodId)

Programmatically control API image visibility for every payment method. apply_filters('mollie_wc_gateway_use_api_image', $value, $paymentMethodId)