Skip to content

Commit 1a3b4a1

Browse files
committed
Clean up
1 parent 5aa3e9a commit 1a3b4a1

2 files changed

Lines changed: 3 additions & 29 deletions

File tree

class.pmprogateway_paystack.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ static function init() {
5454
add_filter('pmpro_payment_option_fields', array('PMProGateway_paystack', 'pmpro_payment_option_fields'), 10, 2);
5555
add_action( 'wp_ajax_kkd_pmpro_paystack_ipn', array('PMProGateway_paystack', 'kkd_pmpro_paystack_ipn'));
5656
add_action( 'wp_ajax_nopriv_kkd_pmpro_paystack_ipn', array('PMProGateway_paystack', 'kkd_pmpro_paystack_ipn'));
57-
// add_action( 'pmpro_after_change_membership_level', array('PMProGateway_paystack','kkd_pmpro_after_change_membership_level'), 10, 3 );
5857
//code to add at checkout
5958
$gateway = pmpro_getGateway();
6059
if($gateway == "paystack")
@@ -149,11 +148,6 @@ function kkd_pmpro_paystack_ipn() {
149148
exit();
150149
}
151150

152-
static function kkd_pmpro_paystack_disable_subscription($code) {
153-
global $wpdb;
154-
155-
156-
}
157151
/**
158152
* Get a list of payment options that the Paystack gateway needs/supports.
159153
*/
@@ -301,28 +295,6 @@ static function pmpro_checkout_before_change_membership_level($user_id, $morder)
301295

302296
$morder->Gateway->sendToPaystack($morder);
303297
}
304-
static function pmpro_checkout_after_change_membership_level($user_id, $morder)
305-
{
306-
global $wpdb, $discount_code_id;
307-
308-
//if no order, no need to pay
309-
if(empty($morder)) {
310-
return;
311-
}
312-
if(empty($morder->code))
313-
$morder->code = $morder->getRandomCode();
314-
315-
$morder->payment_type = "paystack";
316-
$morder->status = "pending";
317-
$morder->user_id = $user_id;
318-
$morder->saveOrder();
319-
320-
//save discount code use
321-
if(!empty($discount_code_id))
322-
$wpdb->query("INSERT INTO $wpdb->pmpro_discount_codes_uses (code_id, user_id, order_id, timestamp) VALUES('" . $discount_code_id . "', '" . $user_id . "', '" . $morder->id . "', now())");
323-
324-
$morder->Gateway->sendToPaystack($morder);
325-
}
326298

327299
function sendToPaystack(&$order) {
328300
global $wp;

readme.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://paystack.com/demo
44
Tags: paystack, recurrent payments, nigeria, mastercard, visa, target,Naira,payments,verve
55
Requires at least: 3.1
66
Tested up to: 4.6.1
7-
Stable tag: 2.0.2
7+
Stable tag: 1.0.1
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -63,6 +63,8 @@ You can also follow us on Twitter! **[@paystack](http://twitter.com/paystack)**
6363

6464

6565
== Changelog ==
66+
= 1.0.1 =
67+
* Cancel Paystack subscription immediately PMP pro subscription is cancelled.
6668
= 1.0.0 =
6769
* First release
6870

0 commit comments

Comments
 (0)