Skip to content

Commit 1f7a62d

Browse files
committed
fix: Add mollie-gateway-icon class to the icon html
1 parent 9cdc22a commit 1f7a62d

6 files changed

Lines changed: 15 additions & 26 deletions

File tree

assets/images/banner.png

475 Bytes
Loading

assets/images/business.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

assets/images/personal.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

assets/images/two-logo-w.svg

Lines changed: 0 additions & 13 deletions
This file was deleted.

class/WC_Twoinc.php

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,10 +2204,7 @@ private function make_request($endpoint, $payload = [], $method = 'POST', $param
22042204
public function twoinc_account_init_notice()
22052205
{
22062206
global $pagenow;
2207-
// Return early if we're in options-general.php
2208-
if ($pagenow === 'options-general.php') {
2209-
return;
2210-
}
2207+
22112208
// Do not show on the Two plugin's own settings page
22122209
if (
22132210
$pagenow === 'admin.php' &&
@@ -2218,6 +2215,8 @@ public function twoinc_account_init_notice()
22182215
) {
22192216
return;
22202217
}
2218+
2219+
// Only show notice if either API key or merchant ID is missing
22212220
if ($this->get_option('api_key') && $this->get_merchant_id()) {
22222221
return;
22232222
}
@@ -2228,7 +2227,7 @@ public function twoinc_account_init_notice()
22282227
echo '
22292228
<div id="twoinc-account-init-notice" class="notice notice-info is-dismissible" style="background-image: url(\'' . WC_TWOINC_PLUGIN_URL . 'assets/images/banner.png\');background-size: cover;border-left-width: 0;background-color: #e2e0ff;padding: 20px;display: flex;">
22302229
<div style="width:60%;padding-right:40px;">
2231-
<img style="width: 100px;" src="' . WC_TWOINC_PLUGIN_URL . 'assets/images/two-logo-w.svg">
2230+
<img style="width: 100px;" src="' . esc_url($this->icon) . '">
22322231
<p style="color: #ffffff;font-size: 1.3em;text-align: justify;font-weight:700;">' . $headline . '</p>
22332232
<p style="color: #ffffff;font-size: 1.3em;text-align: justify;">' . $benefits . '</p>
22342233
</div>
@@ -2285,5 +2284,16 @@ public function process_admin_options()
22852284
$_POST = $post_data;
22862285
parent::process_admin_options();
22872286
}
2287+
2288+
/**
2289+
* Get payment method icon
2290+
*
2291+
* @return string
2292+
*/
2293+
public function get_icon()
2294+
{
2295+
$icon_html = '<img src="' . esc_url($this->icon) . '" alt="' . esc_attr($this->title) . '" class="mollie-gateway-icon" />';
2296+
return apply_filters('woocommerce_gateway_icon', $icon_html, $this->id);
2297+
}
22882298
}
22892299
}

docker-compose.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.1"
2-
31
services:
42
wordpress:
53
container_name: wordpress

0 commit comments

Comments
 (0)