-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added resend STK Push button on thank you page.
- Loading branch information
Showing
4 changed files
with
61 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,13 @@ | |
/** | ||
* @package Mpesa For WooCommerce | ||
* @author Osen Concepts < [email protected] > | ||
* @version 1.20.64 | ||
* @version 1.20.65 | ||
* | ||
* Plugin Name: MPesa For WooCommerce | ||
* Plugin URI: https://wc-mpesa.osen.co.ke/ | ||
* Description: This plugin extends WordPress and WooCommerce functionality to integrate <cite>Mpesa</cite> for making and receiving online payments. | ||
* Author: Osen Concepts Kenya < [email protected] > | ||
* Version: 1.20.64 | ||
* Version: 1.20.65 | ||
* Author URI: https://osen.co.ke/ | ||
* | ||
* Requires at least: 4.6 | ||
|
@@ -47,26 +47,22 @@ | |
define('WCM_PLUGIN_FILE', __FILE__); | ||
} | ||
|
||
add_action('wp', function () { | ||
if (!in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { | ||
deactivate_plugins(plugin_basename(__FILE__)); | ||
} | ||
}); | ||
|
||
register_activation_hook(__FILE__, 'wc_mpesa_activation_check'); | ||
function wc_mpesa_activation_check() | ||
{ | ||
if (!get_option('wc_mpesa_flush_rewrite_rules_flag')) { | ||
add_option('wc_mpesa_flush_rewrite_rules_flag', true); | ||
} | ||
|
||
if (!in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { | ||
deactivate_plugins(plugin_basename(__FILE__)); | ||
exit('Please Install/Activate WooCommerce for the MPesa extension to work'); | ||
} | ||
|
||
if (!is_plugin_active('woocommerce/woocommerce.php')) { | ||
deactivate_plugins(plugin_basename(__FILE__)); | ||
|
||
add_action('admin_notices', function () { | ||
$class = 'notice notice-error is-dismissible'; | ||
$message = __('Please Install/Activate WooCommerce for this extension to work..', 'woocommerce'); | ||
|
||
printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message)); | ||
}); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters