Skip to content

Commit

Permalink
fix: littles corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
epoundor committed Mar 22, 2024
1 parent 9697907 commit 6e496cd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PROJECT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
PLUGIN_BUILDS_PATH="$PROJECT_ROOT/builds"
PLUGIN_BUILD_CONFIG_PATH="$PROJECT_ROOT/build-cfg"
VERSION=$(awk 'NR==7' readme.txt | cut -d ' ' -f 3)
ZIP_FILE=$PROJECT_ROOT/$PLUGIN\_v$VERSION.zip
ZIP_FILE=$PROJECT_ROOT/$PLUGIN.zip

# Ensure the zip file for the current version has been built
if [ ! -f "$ZIP_FILE" ]; then
Expand Down
8 changes: 3 additions & 5 deletions includes/class-wc-kkiapay-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
}

require_once(ABSPATH . 'wp-admin/includes/plugin.php');
require_once __DIR__ . '/class-kkiapay-gateway.php';

class WC_Kkiapay_Gateway extends WC_Payment_Gateway
{
Expand Down Expand Up @@ -92,11 +93,11 @@ public function __construct()
$this->kkiapay_config['sandbox'] = $this->testmode;


if ($this->description === "") {
// if ($this->description === "") {
$this->description = "<div class='kkiapay-payment-method'>
Moov Money, MTN Money, Orange Money, TMoney, FreeMoney, Wave, Visa, Mastercard
</div>";
}
// }



Expand Down Expand Up @@ -293,7 +294,6 @@ public function on_kkiapay_back()
$order_id = $_GET["order_id"];
$transaction_id = $_GET["transaction_id"];

require_once __DIR__ . '/class-kkiapay-gateway.php';
$kkiapay = new KkiapayGateway($this->public_key, $this->private_key, $this->secret, $this->testmode);

if (isset($transaction_id)) {
Expand Down Expand Up @@ -383,7 +383,6 @@ function on_kkiapay_webhook()
return;
}

require_once __DIR__ . '/class-kkiapay-gateway.php';
$kkiapay = new KkiapayGateway($this->public_key, $this->private_key, $this->secret, $this->testmode);
$response = $kkiapay->verifyTransaction($payload->transactionId);
$status = $response->status;
Expand Down Expand Up @@ -448,7 +447,6 @@ public function do_ssl_check()
*/
public function process_refund($order_id, $amount = null, $reason = '')
{
require_once __DIR__ . '/class-kkiapay-gateway.php';
$kkiapay = new KkiapayGateway($this->public_key, $this->private_key, $this->secret, $this->testmode);
if (!($this->public_key && $this->secret)) {
return false;
Expand Down
4 changes: 2 additions & 2 deletions kkiapay-woocommerce-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Author: Kkiapay Developer Team ❤️
* Author URI: https://kkiapay.me/
* License: GPLv2
* Version: 2.4.1
* Version: 2.4.2
* Requires at least: 6.0
* Tested up to: 6.4.3
* WC requires at least: 6.0
Expand All @@ -17,7 +17,7 @@
*/

define('WC_KKIAPAY_MAIN_FILE', __FILE__);
define('WC_KKIAPAY_VERSION', '2.4.1');
define('WC_KKIAPAY_VERSION', '2.4.2');

// Make sure WooCommerce is active
if (!in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins'))))
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: credit card, mobile money, africa payment,online payment, swift payment, b
Requires at least: 6.0
Tested up to: 6.4.3
Requires PHP: 7.4
Stable tag: 2.4.1
Stable tag: 2.4.2
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down

0 comments on commit 6e496cd

Please sign in to comment.