Skip to content

Commit f56505f

Browse files
authored
Version 5.7.3 Release (#67)
1 parent 7234ad4 commit f56505f

6 files changed

Lines changed: 190 additions & 487 deletions

File tree

README.md

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

assets/images/paystack-ke.png

16.7 KB
Loading

includes/class-wc-gateway-paystack.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ class WC_Gateway_Paystack extends WC_Payment_Gateway_CC {
167167
*/
168168
public $secret_key;
169169

170+
/**
171+
* Gateway disabled message
172+
*
173+
* @var string
174+
*/
175+
public $msg;
176+
170177
/**
171178
* Constructor
172179
*/
@@ -267,9 +274,9 @@ public function __construct() {
267274
*/
268275
public function is_valid_for_use() {
269276

270-
if ( ! in_array( get_woocommerce_currency(), apply_filters( 'woocommerce_paystack_supported_currencies', array( 'NGN', 'USD', 'ZAR', 'GHS' ) ) ) ) {
277+
if ( ! in_array( get_woocommerce_currency(), apply_filters( 'woocommerce_paystack_supported_currencies', array( 'NGN', 'USD', 'ZAR', 'GHS', 'KES' ) ) ) ) {
271278

272-
$this->msg = sprintf( __( 'Paystack does not support your store currency. Kindly set it to either NGN (&#8358), GHS (&#x20b5;), USD (&#36;) or ZAR (R) <a href="%s">here</a>', 'woo-paystack' ), admin_url( 'admin.php?page=wc-settings&tab=general' ) );
279+
$this->msg = sprintf( __( 'Paystack does not support your store currency. Kindly set it to either NGN (&#8358), GHS (&#x20b5;), USD (&#36;), KES (KSh) or ZAR (R) <a href="%s">here</a>', 'woo-paystack' ), admin_url( 'admin.php?page=wc-settings&tab=general' ) );
273280

274281
return false;
275282

@@ -290,6 +297,8 @@ public function get_icon() {
290297
$icon = '<img src="' . WC_HTTPS::force_https_url( plugins_url( 'assets/images/paystack-gh.png', WC_PAYSTACK_MAIN_FILE ) ) . '" alt="Paystack Payment Options" />';
291298
} elseif ( 'ZA' === $base_location['country'] ) {
292299
$icon = '<img src="' . WC_HTTPS::force_https_url( plugins_url( 'assets/images/paystack-za.png', WC_PAYSTACK_MAIN_FILE ) ) . '" alt="Paystack Payment Options" />';
300+
} elseif ( 'KE' === $base_location['country'] ) {
301+
$icon = '<img src="' . WC_HTTPS::force_https_url( plugins_url( 'assets/images/paystack-ke.png', WC_PAYSTACK_MAIN_FILE ) ) . '" alt="Paystack Payment Options" />';
293302
} else {
294303
$icon = '<img src="' . WC_HTTPS::force_https_url( plugins_url( 'assets/images/paystack-wc.png', WC_PAYSTACK_MAIN_FILE ) ) . '" alt="Paystack Payment Options" />';
295304
}

0 commit comments

Comments
 (0)