Context:

I am working in MemberMouse (a WordPress Membership Plugin), and I am trying to write a script that updates a member’s status to “Cancelled” after a Refund has been issued on their account.

I’ve been provided with a sample script that simply pulls/provides the users information: https://dl.dropboxusercontent.com/u/265387542/files/payment_notification_script.php

Problem:
I want to take $status = $_GET["status"]; and update it to “Cancelled”. How can I achieve this? Is there a way to $_POST a status value back to MemberMouse, or to set $status equal to something else?

(I am a novice with PHP). Here’s my attempt below:

// ---- PERFORM ACTION BASED ON EVENT TYPE ----
switch($eventType)
{       
    case $REFUND_ISSUED:
        // set status to cancel
        mm_member_status_change("Cancelled");

        break;
}

Read more here: How do I update a value of a variable in PHP?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: