Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter apathetic

    (@amendment)

    FYI…here is the code I gave them that works for upgrades:
    function rcp_process_cancel_membership( $membership_id, $membership ) {
    if ( rcp_multiple_memberships_enabled() )
    if ( $membership->was_upgrade() ) {`
    $previous_membership_id = $membership->get_upgraded_from();
    $previous_membership = rcp_get_membership( $previous_membership_id );
    if ( N == $previous_membership ) {
    $previous_membership->cancel();`

    Here is iTheme’s response that doesn’t work at all for multiple active memberships:

    “While we do not ordinarily provide customized code samples beyond what we have in our developer documentation, I have shared your case with the other support reps and have a code sample for you that hopefully will help you to solve your issue:

    $previous_membership = rcp_get_membership( $previous_membership_id );
    if ( 8 == $previous_membership ) {
    $previous_membership->cancel();
    }

    // you must get/know the specific membership_id that you want to unsubscribe and just add the code

    $specific_membership = rcp_get_membership( “ADD THE ID OF MEMBERSHIP HERE” );
    if ( $specific_membership ) {
    $specific_membership ->cancel();
    }

    Thread Starter apathetic

    (@amendment)

    FYI, iThemes support will not engage on this topic.

    iThemes launched the Restrict Content Pro multiple memberships feature and failed to address common use cases around conditionally adding and cancelling memberships.

    iThemes doesn’t seem to have the technical knowledge to support their customers properly.

Viewing 2 replies - 1 through 2 (of 2 total)