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 / PayplugGatewayOney4x.php

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

46 lines 1.3 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;
4
5 // Exit if accessed directly
6 if (!defined('ABSPATH')) {
7 exit;
8 }
9
10 /**
11 * PayPlug WooCommerce Gateway.
12 */
13 class PayplugGatewayOney4x extends PayplugGatewayOney3x
14 {
15 public function __construct()
16 {
17 parent::__construct();
18 $this->id = 'oney_x4_with_fees';
19 $this->method_title = _x('PayPlug Oney 4x', 'Gateway method title', 'payplug');
20 $this->method_description = __('Enable PayPlug Oney 4x for your customers.', 'payplug');
21 $this->title = __('Pay by card in 4x with Oney', 'payplug');
22 $this->has_fields = true;
23 }
24
25 /**
26 * Get payment icons.
27 *
28 * @return string
29 */
30 public function get_icon()
31 {
32 $disable = $this->check_oney_is_available() === true ? '' : 'disable-checkout-icons';
33 $available_img = 'x4_with_fees.svg';
34
35 $icons = apply_filters('payplug_payment_icons', [
36 'payplug' => sprintf('<img src="%s" alt="Oney 4x" class="payplug-payment-icon ' . $disable . '" />', esc_url(PAYPLUG_GATEWAY_PLUGIN_URL . '/assets/images/checkout/' . $available_img)),
37 ]);
38 $icons_str = '';
39 foreach ($icons as $icon) {
40 $icons_str .= $icon;
41 }
42
43 return $icons_str;
44 }
45 }
46