• Resolved thatfitgirl

    (@thatfitgirl)


    Hi,

    I used the following code to add users/members

    // Add a custom user role

    $result = add_role( ‘paid_member’, __(
    ‘Paid Member’ ),
    array( ) );

    I changed my mind and wanted to change paid member to something else.

    I did that and now paid member as well as the new name is listed under users and I don’t want paid member to be an option when my customers look at the options. I want to know how I can remove it, as I can’t see where it is.

    No coding background – obviously, so if someone could explain in the most simple way possible – e.g. the way you’d explain to a 4yo.

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Adding and removing roles are actions which only need to happen once – not every time a page is loaded – so they should only really be used in ‘only run once’ snippets.

    If you’d like to delete the role you added, you can use this code in an ‘only run once’ snippet:

    
    remove_role( 'paid_member' );
    
Viewing 1 replies (of 1 total)

The topic ‘Help, added code, changed it, but old code still there’ is closed to new replies.