Skip to content

Commit

Permalink
[v2.4.8] add version parameters on assets requests
Browse files Browse the repository at this point in the history
  • Loading branch information
epoundor committed Jun 24, 2024
1 parent 9720459 commit 28f7f35
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
2 changes: 2 additions & 0 deletions deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Need to update version before update on Store.

- kkiapay-woocommerce-plugin.php
* line 10: **Version: 2.4.x**
- kkiapay-woocommerce-plugin.php
* line 20: **define('WC_KKIAPAY_VERSION', '2.4.x');**
- readme.txt
* line 7: **Stable tag: 2.4.x**

Expand Down
2 changes: 1 addition & 1 deletion includes/class-wc-kkiapay-gateway-blocks-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function get_payment_method_data()
return array(
'title' => $this->get_setting('title'),
'description' => $this->get_setting('description'),
'icon' => plugins_url('assets/img/kkiapay.svg', WC_KKIAPAY_MAIN_FILE),
'icon' => plugins_url('assets/img/kkiapay.svg', WC_KKIAPAY_MAIN_FILE) . '?ver=' . WC_KKIAPAY_VERSION,
'supports' => array_filter($gateway->supports, array($gateway, 'supports')),
);
}
Expand Down
16 changes: 10 additions & 6 deletions includes/class-wc-kkiapay-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function __construct()
$this->id = 'kkiapay_woocommerce_plugin';
$this->icon = 'https://github.com/kkiapay/wordpress-plugin/assets/91498943/69fd580e-b43f-4a39-abc9-cba86ebfb74d';
$this->has_fields = true;
// $this->refund = $this->get_option('refund');
// $this->refund = $this->get_option('refund');
$this->title = array_key_exists('title', $this->settings) ? $this->settings['title'] : '';
$this->method_title = 'Kkiapay';
$this->description = "<div class='kkiapay-payment-method'>
Expand Down Expand Up @@ -103,7 +103,7 @@ public function __construct()


// if ($this->description === "") {
$this->description = "<div class='kkiapay-payment-method'>
$this->description = "<div class='kkiapay-payment-method'>
Moov Money, MTN Money, Orange Money, TMoney, FreeMoney, Wave, Visa, Mastercard
</div>";
// }
Expand Down Expand Up @@ -151,17 +151,21 @@ public function import_kkiapay()



wp_register_style('custom-kkiapay-style', plugins_url('../assets/css/style.css', __FILE__));
wp_register_style('custom-kkiapay-style', plugins_url('../assets/css/style.css', __FILE__), [], $plugin_information['Version']);
wp_enqueue_style('custom-kkiapay-style');

wp_enqueue_script('setup-kkiapay-script', "https://cdn.kkiapay.me/k.js", [], $plugin_information['Version'], true);
wp_register_script('init-kkiapay-script', plugins_url('../assets/js/invoke.js', __FILE__), ['setup-kkiapay-script'], 'v1', true);
wp_register_script('init-kkiapay-script', plugins_url('../assets/js/invoke.js', __FILE__), ['setup-kkiapay-script'], $plugin_information['Version'], true);
}

public function import_admin_scripts()
{
wp_enqueue_script('jscolor', plugins_url('../assets/js/jscolor.js', __FILE__), [], 'v1', true);
wp_enqueue_script('setup-admin-script', plugins_url('../assets/js/admin.js', __FILE__), [], 'v1', true);
$filename = 'kkiapay-woocommerce-plugin.php';
$path = plugin_dir_path(__DIR__) . $filename;
$plugin_information = get_plugin_data($path);

wp_enqueue_script('jscolor', plugins_url('../assets/js/jscolor.js', __FILE__), [], $plugin_information['Version'], true);
wp_enqueue_script('setup-admin-script', plugins_url('../assets/js/admin.js', __FILE__), [], $plugin_information['Version'], true);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion kkiapay-woocommerce-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

define('WC_KKIAPAY_MAIN_FILE', __FILE__);
define('WC_KKIAPAY_VERSION', '2.4.5');
define('WC_KKIAPAY_VERSION', '2.4.7');

// Make sure WooCommerce is active
if (!in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins'))))
Expand Down
Binary file modified kkiapay-woocommerce.zip
Binary file not shown.
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.7
Stable tag: 2.4.8
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down

0 comments on commit 28f7f35

Please sign in to comment.