• Resolved mimmo99

    (@mimmo99)


    Hi, I noticed that after a user cancels their subscription, the index of the role array changes.

    
    $current_user   = wp_get_current_user();
    echo '<pre>';
    print_r($current_user->roles);
    echo '</pre>'; 
    

    Before cancellation:

    
    Array
    (
        [0] => pmpro_role_2
    )
    

    After cancellation:

    
    Array
    (
        [1] => pmpro_role_1
    )
    

    and that’s a problem.
    Using also the pmpro_after_change_membership_level hook, the index is already updated to 1.
    Is it a bug? How can you get around?
    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi there,

    Thank you for using Paid Memberships Pro.

    Please can you open a support ticket on https://www.paidmembershipspro.com as we are not allowed to support premium plugins/Add Ons on www.remarpro.com forums as it goes against the guidelines.

    We will continue to assist you once a ticket is opened on Paid Memberships Pro website.

    Thank you for understanding.

    Thread Starter mimmo99

    (@mimmo99)

    Thanks, but this is about the free version of the plugin, or am I wrong?

    Plugin Author Andrew Lima

    (@andrewza)

    Sorry for my mistake in wording here, this plugin is free and supported on https://www.paidmembershipspro.com as it’s not part of the core plugin (this version).

    These support forums are only used for Paid Memberships Pro.

    Thread Starter mimmo99

    (@mimmo99)

    @andrewza I’m really sorry, I really can’t understand what you mean. This is the plugin support forum, right? I’m asking for help for this plugin which is supported in the WordPress forum (there are a lot of questions with answers).

    What’s wrong with my question?

    Are you telling me I have to pay for an answer?

    Thanks again

    Plugin Author Andrew Lima

    (@andrewza)

    The pmpro_role_1 (custom roles) comes from one of our Add Ons that’s available for download from our site and not distributed via www.remarpro.com – https://www.paidmembershipspro.com/add-ons/pmpro-roles/

    The custom role functionality isn’t available with Paid Memberships Pro core.

    By default when a user’s membership get’s removed their role changes to ‘subscriber’. Please can you open a ticket on our site so we may continue to support you over there.

    Thread Starter mimmo99

    (@mimmo99)

    @andrewza Ok now I understand sorry, although the addon is free, it is not supported here, ok fine.

    To open the ticket I have to pay?

    Thanks

    • This reply was modified 4 years, 6 months ago by mimmo99.
    Plugin Author Andrew Lima

    (@andrewza)

    Thread Starter mimmo99

    (@mimmo99)

    thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘User roles array index is changed after cancellation’ is closed to new replies.