• Resolved TheBusinessCat

    (@thebusinesscat)


    Hi there,

    I have an issue when I try to delete a registered user by selecting the checkbox and then selecting delete on the Users page (see this screenshot), I get this message (see this screenshot).

    I have found out that it is caused by this plugin because when I deactivate the plugin, I am then able to delete the users.

    Just to let you know that I am able to hover over the user and delete them by clicking the delete link, but when I want to bulk delete this can become time-consuming.

    I am not sure if it’s a setting I am missing or if you have a solution for me.

    Please advise,

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Waseem Senjer

    (@waseem_senjer)

    Hello @thebusinesscat

    Is the user that you logged in created by the plugin or a normal admin user?

    Thread Starter TheBusinessCat

    (@thebusinesscat)

    Hi @waseem_senjer

    Thank you for your message.

    I am just a standard admin user created by WordPress.

    There is another admin that is also having the issue, and he has the standard admin role and WooCommerce customer role.

    Just to let you know that there is a new user role created called chairperson, and this is done with some code, which I will put below, however, I nor the other admin has this user role set.

    function add_egha_chairperson_role() {
        // Add the custom role with read-only capabilities
        $role = 'chairperson';
        $display_name = 'Chairperson';
        $capabilities = array(
            'read' => true
        );
        add_role($role, $display_name, $capabilities);
    }
    add_action('init', 'add_egha_chairperson_role');
    
    // Assign Chairperson role to specific ID's
    $egha_chairperson_user_ids = array( 552, 554, 593, 604, 605, 606, 607, 608, 609, 610, 615, 887); 
    
    foreach ( $egha_chairperson_user_ids as $user_id ) {
        $user = new WP_User( $user_id );
        $user->add_role( 'chairperson' );
    }
    
    // Add customer role to Chairperson after purchase
    function add_customer_role_to_chairperson( $order_id ) {
        $order = new WC_Order( $order_id );
        $user_id = $order->get_user_id();
        $user = new WP_User( $user_id );
        if ( in_array( 'chairperson', (array) $user->roles ) ) {
            $user->add_role( 'customer' );
        }
    }
    add_action( 'woocommerce_new_order', 'add_customer_role_to_chairperson' );

    Thank you.

    Plugin Author Waseem Senjer

    (@waseem_senjer)

    Hello @thebusinesscat
    Thanks for the info. Please, update the plugin to the latest version 2.0.12 it should fix the issue. Please let me know if you have any other issues, I will be glad to help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to delete registered users’ is closed to new replies.