Skip to content

Commit e9f6af1

Browse files
committed
Version 1.1.0
1 parent 1614184 commit e9f6af1

3 files changed

Lines changed: 35 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
**Requires at least:** 4.1
99

10-
**Tested up to:** 4.4
10+
**Tested up to:** 4.5
1111

12-
**Stable tag:** 1.0.0
12+
**Stable tag:** 1.1.0
1313

1414
**License:** GPLv2 or later
1515

@@ -107,6 +107,9 @@ To configure the plugin, go to __WooCommerce > Settings__ from the left hand me
107107

108108
## Changelog ##
109109

110+
### 1.1.0 ###
111+
* Fix: Fatal error if the WooCommerce plugin is deactivated while the Paystack plugin is active
112+
110113
### 1.0.0 ###
111114
* First release
112115

@@ -116,7 +119,10 @@ To configure the plugin, go to __WooCommerce > Settings__ from the left hand me
116119

117120
## Upgrade Notice ##
118121

119-
There is no need to upgrade just yet.
122+
### 1.1.0 ###
123+
* Fix: Fatal error if the WooCommerce plugin is deactivated while the Paystack plugin is active
124+
125+
120126

121127

122128

readme.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Contributors: tubiz
33
Donate link: http://bosun.me/donate
44
Tags: paystack, woocommerce, payment gateway, interswitch, tubiz plugins, verve, nigeria, mastercard, visa
55
Requires at least: 4.1
6-
Tested up to: 4.4
7-
Stable tag: 1.0.0
6+
Tested up to: 4.5
7+
Stable tag: 1.1.0
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -99,6 +99,9 @@ To configure the plugin, go to __WooCommerce > Settings__ from the left hand me
9999

100100
== Changelog ==
101101

102+
= 1.1.0 =
103+
* Fix: Fatal error if the WooCommerce plugin is deactivated while the Paystack plugin is active
104+
102105
= 1.0.0 =
103106
* First release
104107

@@ -108,8 +111,8 @@ To configure the plugin, go to __WooCommerce > Settings__ from the left hand me
108111

109112
== Upgrade Notice ==
110113

111-
There is no need to upgrade just yet.
112-
114+
= 1.1.0 =
115+
* Fix: Fatal error if the WooCommerce plugin is deactivated while the Paystack plugin is active
113116

114117

115118

woo-paystack.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Paystack WooCommerce Payment Gateway
44
Plugin URI: https://paystack.com
55
Description: WooCommerce payment gateway for Paystack
6-
Version: 1.0.0
6+
Version: 1.1.0
77
Author: Tunbosun Ayinla
88
Author URI: http://bosun.me
99
License: GPL-2.0+
@@ -14,11 +14,14 @@
1414
exit;
1515
}
1616

17-
1817
add_action( 'plugins_loaded', 'tbz_wc_paystack_init', 0 );
1918

2019
function tbz_wc_paystack_init() {
2120

21+
if ( ! class_exists( 'WC_Payment_Gateway' ) ) {
22+
return;
23+
}
24+
2225
class Tbz_WC_Paystack_Gateway extends WC_Payment_Gateway {
2326

2427
/**
@@ -377,6 +380,20 @@ public function verify_paystack_transaction() {
377380

378381
}
379382

383+
384+
/**
385+
* Add Settings link to the plugin entry in the plugins menu
386+
**/
387+
function tbz_woo_paystack_plugin_action_links( $links ) {
388+
$settings_link = array(
389+
'settings' => '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=checkout&section=tbz_wc_paystack_gateway' ) . '" title="View Paystack WooCommerce Settings">Settings</a>'
390+
);
391+
return array_merge( $links, $settings_link );
392+
}
393+
add_filter('plugin_action_links_' . plugin_basename( __FILE__ ), 'tbz_woo_paystack_plugin_action_links' );
394+
395+
396+
380397
/**
381398
* Add Paystack Gateway to WC
382399
**/

0 commit comments

Comments
 (0)