Jump to content
tejli007

Remove register domain from clienthome

Recommended Posts

Dear Comunity, dear Brian 🙂

 

Any chance to remove the register domain tab from clientarea home but ONLY FOR one client group.

 

Here is the hook but its global. It should added some code like if clientgroup x then show else do not show. Unfortunatly am not the one who knows how to do it thats why please help me 🙂

 

 

<?php
use WHMCS\View\Menu\Item;

add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels)
{
$homePagePanels->removeChild('Register a New Domain');


});

 

Share this post


Link to post
Share on other sites
21 hours ago, tejli007 said:

Here is the hook but its global. It should added some code like if clientgroup x then show else do not show. Unfortunatly am not the one who knows how to do it thats why please help me 🙂

<?php

# Remove Domain Register HomePagePanel Based On Client Group Hook
# Written by brian!

use WHMCS\View\Menu\Item;

add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) {
	
	$client = Menu::context('client');
	$groupid = $client->groupId;
	if ($groupid == 8) {
		$homePagePanels->removeChild('Register a New Domain');
	}
});

 

Share this post


Link to post
Share on other sites
4 hours ago, brian! said:

<?php

# Remove Domain Register HomePagePanel Based On Client Group Hook
# Written by brian!

use WHMCS\View\Menu\Item;

add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) {
	
	$client = Menu::context('client');
	$groupid = $client->groupId;
	if ($groupid == 8) {
		$homePagePanels->removeChild('Register a New Domain');
	}
});

 

Thank you Mate! Am on mobile so am not a ke to test it in the next days but am sure it will work. You saved the community a lot of time. Really thank you. 

Add some donation link in your signature. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated