Skip to content

Commit 637ca2e

Browse files
committed
Updates
1 parent 4f66805 commit 637ca2e

4 files changed

Lines changed: 58 additions & 2 deletions

File tree

includes/classes/PPMFWC/Gateway/Abstract.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ public function getIcon()
6969
if (!empty($brandid)) {
7070
return PPMFWC_PLUGIN_URL . 'assets/logos/' . $this->get_option('brand_id') . '.png';
7171
}
72+
73+
if (!empty($this->getImagePathName())) {
74+
return PPMFWC_PLUGIN_URL . 'assets/logos/payment_method_groups/' . $this->getImagePathName();
75+
}
76+
7277
return '';
7378
}
7479

@@ -867,5 +872,12 @@ public function thankyou_page()
867872
}
868873
}
869874

875+
/**
876+
* @return integer
877+
*/
878+
public static function getImagePathName()
879+
{
880+
return '';
881+
}
870882

871883
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
/**
4+
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
5+
* @phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
6+
* @phpcs:disable PSR1.Methods.CamelCapsMethodName
7+
*/
8+
9+
class PPMFWC_Gateway_GiftCardsGrouped extends PPMFWC_Gateway_Abstract
10+
{
11+
/**
12+
* @return string
13+
*/
14+
public static function getId()
15+
{
16+
return 'pay_gateway_giftcardsgrouped';
17+
}
18+
19+
/**
20+
* @return string
21+
*/
22+
public static function getName()
23+
{
24+
return 'Giftcards or Voucher';
25+
}
26+
27+
/**
28+
* @return integer
29+
*/
30+
public static function getOptionId()
31+
{
32+
return 3189;
33+
}
34+
35+
/**
36+
* @return integer
37+
*/
38+
public static function getImagePathName()
39+
{
40+
return 'VOUCHER.png';
41+
}
42+
43+
}

includes/classes/PPMFWC/Gateways.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ private static function getAvailableWoocomStatus($default, $excludeStates = arra
176176
'PPMFWC_Gateway_Yourgift',
177177
'PPMFWC_Gateway_YourGreenGiftCard',
178178
'PPMFWC_Gateway_Yehhpay',
179+
'PPMFWC_Gateway_GiftCardsGrouped',
179180
);
180181

181182
/**
@@ -622,7 +623,7 @@ public static function ppmfwc_addGlobalSettings()
622623
$addedSettings[] = array(
623624
'name' => __('Multicore', PPMFWC_WOOCOMMERCE_TEXTDOMAIN),
624625
'type' => 'select',
625-
'options' => PPMFWC_Helper_Data::ppmfwc_getGateways(),
626+
'options' => PPMFWC_Helper_Data::ppmfwc_getCores(),
626627
'desc' => esc_html(__('Select the core which will be used for processing payments', PPMFWC_WOOCOMMERCE_TEXTDOMAIN)),
627628
'id' => 'paynl_failover_gateway',
628629
'default' => 'nl',

includes/classes/PPMFWC/Helper/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public static function ppmfwc_getAvailableLanguages()
351351
/**
352352
* @return string[]
353353
*/
354-
public static function ppmfwc_getGateways()
354+
public static function ppmfwc_getCores()
355355
{
356356
$cores = get_site_option('paynl_cores') ?? [];
357357

0 commit comments

Comments
 (0)