• Resolved Anonymous User 17335794

    (@anonymized-17335794)


    Hello,

    From user list UM action I want to hide/remove following options.

    Approve Membership,
    Put as Pending Review,
    Resend Activation Email.

    I want to rename the following options from UM action.

    Reactivate -> Account Reactivate,
    Deactivate -> Account Deactivate,
    Reject Membership -> Inactive Account.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support mansurahamed

    (@mansurahamed)

    Hi @anish12345,

    Add following snippet in your child theme’s functions.php file which should do the trick

    add_filter( 'um_admin_bulk_user_actions_hook', function($actions ){
    	unset($actions['um_approve_membership']);
    	unset($actions['um_put_as_pending']);
    	unset($actions['um_resend_activation']);
    	$actions['um_reenable']['label'] = __( 'Account Reactivate', 'ultimate-member' );
    	$actions['um_deactivate']['label'] = __( 'Account Deactivate', 'ultimate-member' );
    	$actions['um_reject_membership']['label'] = __( 'Inactive Account', 'ultimate-member' );
    	return $actions;
    	}, 10, 1 );

    Thank you.

    Thread Starter Anonymous User 17335794

    (@anonymized-17335794)

    Thanks, it’s working.

    I need one more help. Account approval email I don’t want send automatically.
    I want only send the email when I am select approval button from UM action.

    Plugin Support mansurahamed

    (@mansurahamed)

    Hi @anish12345,

    That’s not possible. You can go to Ultimate Member->User Role->Your user’s role->Edit->Registration option, and choose Require admin review there. Then user will only get approved when you approve them from users menu inside admin. So the approval email will be sent then too only. If your user’s accounts get approved automatically, there is not need to select approval button from UM action. Hope it’s clear.

    Thanks.

    Thread Starter Anonymous User 17335794

    (@anonymized-17335794)

    Yes, I am set for automatic account approval option. But I don’t want email send to user when account is automatically approved.

    But I need only send to email when manually approved from admin side.

    I hope you understand.

    Plugin Support mansurahamed

    (@mansurahamed)

    Hi @anish12345,

    Ultimate Member doesn’t have any such feature right now.

    Thanks.

    Thread Starter Anonymous User 17335794

    (@anonymized-17335794)

    Hello,

    Please check with this attachment.

    https://drive.google.com/file/d/1Ctv6Si7xiDRI-7QoaxrS7aUFqCo2vNtS/view?usp=sharing

    I need to remove/hide “Pending review” and “Waiting e-mail confirmation” fron wp user list count.

    And I need to change the name “Inactive” to “Suspended”.

    • This reply was modified 2 years, 3 months ago by Anonymous User 17335794.

    I want to know too.

    Plugin Support mansurahamed

    (@mansurahamed)

    hi @anish12345 ,

    Add following code in your child theme’s functions.php file and see if that works

    add_filter('um_admin_views_users',function($views){
    	$views['inactive'] = '<a href="' . esc_url( admin_url( 'users.php' ) ). '?um_status=inactive">'.__( 'Suspended', 'ultimate-member' ).' <span class="count">(' . UM()->query()->count_users_by_status( 'inactive' ) . ')</span></a>';
    	unset($views['awaiting_admin_review']);
    	unset($views['awaiting_email_confirmation']);
    	return $views;
    });

    Thanks.

    Thread Starter Anonymous User 17335794

    (@anonymized-17335794)

    Thanks for your replay,

    But I am facing one problem. Please check with attached screenshot.

    https://drive.google.com/file/d/1LbZzc9YgKbcgO9APoaTj2e-npdeMDxyP/view?usp=share_link

    When I click “Suspended” menu the black bold letter not showing. When I remove the last code from you provide then it will be working properly.

    Plugin Support mansurahamed

    (@mansurahamed)

    Hi @anish12345,

    Change previous snippet to this, should be fine now

    add_filter('um_admin_views_users',function($views){
    	if ( isset( $_REQUEST['um_status'] ) && sanitize_key( $_REQUEST['um_status'] ) === 'inactive' )
    	{
    		$current = 'class="current"';
    	} else	$current = '';
    
    	$views['inactive'] = '<a href="' . esc_url( admin_url( 'users.php' ) ). '?um_status=inactive" ' . $current . '>'.__( 'Suspended', 'ultimate-member' ).' <span class="count">(' . UM()->query()->count_users_by_status( 'inactive' ) . ')</span></a>';
    	unset($views['awaiting_admin_review']);
    	unset($views['awaiting_email_confirmation']);
    	return $views;
    });

    Thanks.

    Thread Starter Anonymous User 17335794

    (@anonymized-17335794)

    Thanks for your reply,

    I need one more help.

    From status I want to change like this

    Membership Inactive To Account Suspended.
    Membership Rejected To Account Rejected.
    Approved To Account Active.

    • This reply was modified 2 years, 3 months ago by Anonymous User 17335794.
    • This reply was modified 2 years, 3 months ago by Anonymous User 17335794.
    • This reply was modified 2 years, 3 months ago by Anonymous User 17335794.
    Thread Starter Anonymous User 17335794

    (@anonymized-17335794)

    Hello,

    I am waiting for your reply.

    Hi @anish12345,

    Try Using following code in functions.php to change those

    add_filter( 'um_user_permissions_filter', 'my_custom_user_permissions', 10, 2 );
    
    function my_custom_user_permissions( $permissions, $user_id ) {
    if(isset($permissions['account_status_name']) && $permissions['account_status_name'] == 'Membership Inactive') $permissions['account_status_name'] = 'Account Suspended';
    else if(isset($permissions['account_status_name']) && $permissions['account_status_name'] == 'Membership Rejected') $permissions['account_status_name'] = 'Account Rejected';
    return $permissions;
    }

    Thanks.

    • This reply was modified 2 years, 3 months ago by iworksolo.
    Thread Starter Anonymous User 17335794

    (@anonymized-17335794)

    Please read the thread carefully.

    This status I want to change like this

    Membership Inactive To Account Suspended.

    Membership Rejected To Account Rejected.

    Approved To Account Active.

    In previous code you not mention the “Approved” status.

    • This reply was modified 2 years, 3 months ago by Anonymous User 17335794.
    Plugin Support mansurahamed

    (@mansurahamed)

    Hi @anish12345,

    This should work to change the required status names in the Users menu

    add_filter( 'um_user_permissions_filter', 'my_custom_user_permissions', 10, 2 );
    
    function my_custom_user_permissions( $permissions, $user_id ) {
    	if(isset($permissions['account_status_name'])){
    		if($permissions['account_status_name'] == 'Membership Inactive') $permissions['account_status_name'] = 'Account Suspended';
    		else if($permissions['account_status_name'] == 'Membership Rejected') $permissions['account_status_name'] = 'Account Rejected';
    		else if($permissions['account_status_name'] == 'Approved') $permissions['account_status_name'] = 'Account Active';
    	}
    	return $permissions;
    }

    Thanks.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘UM Action Remove And Rename’ is closed to new replies.