File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -818,14 +818,19 @@ public function process_cancel_subscription($sub_id)
818818 {
819819 $ sub = new MeprSubscription ($ sub_id );
820820
821+ //Getting the value of the paystack_email_token from the array and storing the value in a variable
822+ $ array = $ sub ->get_meta ('paystack_email_token ' );
823+ $ token = $ array [0 ];
824+
825+
821826 if (!isset ($ sub ->id ) || (int ) $ sub ->id <= 0 )
822827 throw new MeprGatewayException (__ ('This subscription is invalid. ' , 'memberpress ' ));
823828
824829 $ args = MeprHooks::apply_filters ('mepr_paystack_cancel_subscription_args ' , array (
825830 'code ' => $ sub ->subscr_id ,
826- 'token ' => $ sub -> get_meta ( ' paystack_email_token ' ) ,
831+ 'token ' => $ token ,
827832 ), $ sub );
828-
833+
829834 // Yeah ... we're cancelling here bro ... but this time we don't want to restart again
830835 $ res = $ this ->paystack_api ->send_request ("subscription/disable " , $ args );
831836
You can’t perform that action at this time.
0 commit comments