Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/images/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions assets/images/business.svg

This file was deleted.

3 changes: 0 additions & 3 deletions assets/images/personal.svg

This file was deleted.

13 changes: 0 additions & 13 deletions assets/images/two-logo-w.svg

This file was deleted.

20 changes: 15 additions & 5 deletions class/WC_Twoinc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2204,10 +2204,7 @@ private function make_request($endpoint, $payload = [], $method = 'POST', $param
public function twoinc_account_init_notice()
{
global $pagenow;
// Return early if we're in options-general.php
if ($pagenow === 'options-general.php') {
return;
}

// Do not show on the Two plugin's own settings page
if (
$pagenow === 'admin.php' &&
Expand All @@ -2218,6 +2215,8 @@ public function twoinc_account_init_notice()
) {
return;
}

// Only show notice if either API key or merchant ID is missing
if ($this->get_option('api_key') && $this->get_merchant_id()) {
return;
}
Expand All @@ -2228,7 +2227,7 @@ public function twoinc_account_init_notice()
echo '
<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;">
<div style="width:60%;padding-right:40px;">
<img style="width: 100px;" src="' . WC_TWOINC_PLUGIN_URL . 'assets/images/two-logo-w.svg">
<img style="width: 100px;" src="' . esc_url($this->icon) . '">
<p style="color: #ffffff;font-size: 1.3em;text-align: justify;font-weight:700;">' . $headline . '</p>
<p style="color: #ffffff;font-size: 1.3em;text-align: justify;">' . $benefits . '</p>
</div>
Expand Down Expand Up @@ -2285,5 +2284,16 @@ public function process_admin_options()
$_POST = $post_data;
parent::process_admin_options();
}

/**
* Get payment method icon
*
* @return string
*/
public function get_icon()
{
$icon_html = '<img src="' . esc_url($this->icon) . '" alt="' . esc_attr($this->title) . '" class="mollie-gateway-icon" />';
return apply_filters('woocommerce_gateway_icon', $icon_html, $this->id);
}
}
}
2 changes: 0 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.1"

services:
wordpress:
container_name: wordpress
Expand Down