Overview

Introduction

A few months ago we built an integration for our customer between his MemberMouse membership site and the PayKickStart shopping cart / sales funnel app.

At the time I also wrote an article explaining exactly how to integrate MemberMouse with PayKickStart including all of the custom code you need to make it work.

Recently, another MemberFix customer needed a similar integration between PayKickstart (PKS) and MemberMouse.

But this customer’s situation was a little bit different…

Video Tutorial

php

<?php

if(!isset($_GET["member_id"]) || empty($_GET["member_id"]))
{
exit;
}

$memberId = $_GET["member_id"];

$inputParams = "apikey=Your API Key Here&apisecret=Your API Secret&";
$inputParams .= "member_id={$memberId}&";
$inputParams .= "status=1&";
$inputParams .= "membership_level_id=The Level ID of the Paid Membership&";

$apiCallUrl = "https://YourDomain.com/wp-content/plugins/membermouse/api/request.php?q=/updateMember";
$ch = curl_init($apiCallUrl);

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $inputParams);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);

?>
​

2 – For the above code, you will need to add your MemberMouse API credentials which you will be able to find in your WordPress Dashboard by going to MemberMouse > Developer Tools under “API Credentials” tab.

membermouse api credentials wp - Auto change membership levels in MemberMouse upon signup

3 – And, you will need to add the ID number of the paid membership that you want members moved to, which you can find by going to MemberMouse > Product Settings under “Membership Levels” tab and mousing over the membership name (the ID = 2 in the example screenshot below).

mm membermouse membership id - Auto change membership levels in MemberMouse upon signup

4 – Then add the file to your theme folder (https://yourdomain.com/wp-content/themes/your-child-theme-folder).

Obviously your child theme folder directory probably won’t be named “your-child-theme-folder”. 😉

IMPORTANT: I highly recommend that you first create a child theme, or use the My Custom Functions WordPress plugin whenever you add custom code to your theme files. Otherwise, any time you update your theme your changes will get wiped out!

Step 2 – Create a MemberMouse Push Notification

After the PHP file is created and uploaded to FTP, we will need a way to TRIGGER the code right after the user is added to the “free” membership. And for this we will create a MemberMouse Push Notification.

1 – Log in your WordPress dashboard and go to MemberMouse > Developer Tools.

membermouse push notification - Auto change membership levels in MemberMouse upon signup

2 – Click on “Create Push Notification” green button and add the below settings:

membermouse edit push notification - Auto change membership levels in MemberMouse upon signup

3 – The URL to your custom script will be:

https://yourdomain.com/wp-content/themes/your-child-theme-folder/change_membership_pks.php.

4 – Click on “Save Push Notification” and… that is all!

5 – Want our team to do this integration for you?

No problem, just visit our MemberFix product information page and sign up or get in touch for a call!

 

t

Do you use PayKickStart or ThriveCart or any other 3rd party shopping cart / funnel software? 

Why or why not? Let us know in the comments below!

 

Did you find this tutorial helpful?
0
1
User Review
100/100 (1 vote)
Share This