I'm trying to change the icon that appears next to a payment method. To do so I've tracked where the payment gateway plugin is getting the icon from, and I've found out this class with a url assigned to $this->icon:
class WC_Gateway_Rapyd_Card extends WC_Rapyd_Payment_Gateway {
public function __construct() {
$this->id = RAPYD_CARD_ID;
$this->title = RAPYD_CARD_TITLE;
$this->method_title = RAPYD_CARD_METHOD_TITLE;
$this->description = RAPYD_CARD_DESCRIPTION;
/* translators: link */
$this->method_description = RAPYD_CARD_METHOD_DESCRIPTION;
$this->has_fields = true;
$this->icon = 'https://cdn.rapyd.net/plugins/icons/card_icon.png';
$this->constructor_helper();
}
public function getCategory() {
return RAPYD_CATEGORY_CARD;
}
}
To change the icon I can update the current url with my own, but doing it this way would probably mean that I would have to do this every time the plugin is updated.
Would it be possible/advisable to assign the url to $this->icon inside this class from the functions.php?