Users role after subscription pro site

About pro site, actually after plan subscription the users have admin role. Is that possible to give automaticly author roles for all users that takes pro plan?

We have 2 plans it will be better to have one rolefor each plan. I mean for the first plan Author, and the second Author2. like that I'll duplicate Author role and I'll add 2 (with editor role plugin)

  • Dimitris
    • Support Star

    Hello there Sarah,

    hope you're doing good today! :slight_smile:

    This is already escalated to our Second Level Support team for further consideration.
    Me or another colleague of mine will keep you posted here. Please keep in mind that SLS response times are larger than ours, so your patience on this is highly appreciated!

    Warm regards,
    Dimitris

  • Dimitris
    • Support Star

    Hey Sarah,

    I trust you're doing good today! There's still no feedback from our SLS team on this, as they constantly work in member's sites/tasks from oldest to newest report. I've already pinged them again about your case, we'll keep you informed here as soon as possible! :slight_smile:

    Take care,
    Dimitris

  • Panos
    • SLS

    Hey there Sarah ,

    Sincere apologies for such delay here!

    You can try adding the following snippet in a mu-plugin:

    add_action( 'wpmu_activate_blog', function(  $blog_id, $user_id ){
    
        switch_to_blog( $blog_id );
        $user = get_user_by( "ID", $user_id );
        $user->remove_role('administrator');
        $user->set_role('editor');
        restore_current_blog();
    
    }, 2, 2 );

    Kind regards!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.