Revise icon functionality
Closed this issue · 2 comments
We currently have an icon setting with a default value from PaymentMethods::get_icon_url( … )
.
wp-pronamic-pay-woocommerce/src/Gateway.php
Lines 272 to 281 in 988bca2
wp-pronamic-pay-woocommerce/src/Extension.php
Lines 384 to 394 in 988bca2
The PaymentMethods::get_icon_url( … )
method is implemented in:
For example, the icon link for the iDEAL payment method is currently:
https://cdn.wp-pay.org/jsdelivr.net/npm/@wp-pay/logos@1.16.0/dist/methods/ideal/method-ideal-wc-51x32.svg
We actually want to work towards having the icons included in Pronamic Pay and no longer being loaded via a CDN. However, to do this we need to prevent local file paths/URLs from being saved. If local plugin file paths/URLs are stored, we can never actually delete these files without causing 404s.
The https://github.com/mollie/WooCommerce plugin has the following settings for this:
- Display logo ☑️ Display logo on checkout page. Default
enabled
- Enable custom logo ☑️ Enable the feature to add a custom logo for this gateway. This feature will have precedence over other logo options.
- Upload custom logo Choose file
I suggest we change our settings to:
Icon:
- 🔘 Default
- 🔘 None
- 🔘 Custom
- URL: __________