PluginProbe
PayPlug for WooCommerce (Official) / 3.1.0
PayPlug for WooCommerce (Official) v3.1.0
3.1.0 3.0.0 2.18.0 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.0 1.10.0 1.10.1 1.2.1 1.2.10 1.2.11 1.2.2 1.2.3 1.2.4 1.2.5 All 102 releases
payplug / src / Gateway / Blocks / PayplugOney3xWithoutFees.php

PayplugOney3xWithoutFees.php in PayPlug for WooCommerce (Official) 3.1.0, at src/Gateway/Blocks/PayplugOney3xWithoutFees.php

37 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Payplug\PayplugWoocommerce\Gateway\Blocks;
4
5 use Payplug\PayplugWoocommerce\PayplugWoocommerceHelper;
6
7 class PayplugOney3xWithoutFees extends PayplugOney
8 {
9 /**
10 * Payment method name/id/slug.
11 *
12 * @var string
13 */
14 protected $name = 'oney_x3_without_fees';
15
16 protected $icon = 'x3_without_fees_';
17
18 public function get_payment_method_data()
19 {
20 $data = parent::get_payment_method_data();
21
22 $country = PayplugWoocommerceHelper::getISOCountryCode();
23 if (file_exists(PAYPLUG_GATEWAY_PLUGIN_URL . 'assets/images/checkout/' . $this->icon . $country . '.svg')) {
24 $image = PAYPLUG_GATEWAY_PLUGIN_URL . 'assets/images/checkout/' . $this->icon . $country . '.svg';
25 } else {
26 $image = PAYPLUG_GATEWAY_PLUGIN_URL . 'assets/images/checkout/' . $this->icon . 'FR.svg';
27 }
28 $data['icon'] = [
29 'src' => $image,
30 'class' => 'payplug-payment-icon',
31 'alt' => $this->gateway->title,
32 ];
33
34 return $data;
35 }
36 }
37