Question


I have installed MemberMouse plugin on a website, to cancel a Membership, I've placed this link:


<a href="[MM_Member_Link type='cancelMembership']">Cancel Membership</a>



This is the error I am getting:


[AJAX ERROR] Incorrect response data :

Fatal error: Call to a member function isValid() on a non-object in /home/sallysym/public_html/wp-content/plugins/membermouse/includes/init.php(245) : eval()'d code on line 175


Answer


The WordPress auth cookie is not retained when switching between HTTP and HTTPS. If the page the link is on is one, and the link itself is the other, then this is one of the error messages that can be displayed.

Here's a relevant article in the WordPress forums regarding this: https://wordpress.org/support/topic/http-and-https-differences-for-function-is_user_logged_in-in-wordpress-40


In this case since the link is a JavaScript function it's ultimately handled by WordPress' admin-ajax.php. So if admin-ajax.php is being forced to the HTTPS protocol then the page you're using this SmartTag on will also have to be HTTPS in order to work.