Jump to content
Sign in to follow this  

[Request] Hook to auto add/remove client group when service is active/finished

Recommended Posts

Hello again!

The title says everything. I found a hook on github but it's not working so I'm here to ask for help 😊

I hope this topic help a lot of people.

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.

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.

Sign in to follow this  

  • Similar Content

    • By JesusSuarz
      sometimes the client can have 2 emails.
      one for your account details and one for the account owner.
      I need to know if the account owner's email is verified.
      The var: 
      $client = Menu::context("client"); gets the email that the customer has in the account details, however this is not the email owner of the account.
      I hope to make myself understood correctly.
    • By karlfrankeser
      I am new to this community!
      I am setting up a hook that allows me to pass new client data to Zapier in order to update our Marketing automation software.
      This is the code I have been testing now:
      add_hook('ClientAdd', 1, function ($vars) { $userid = $vars['userid']; $firstname = $vars['firstname']; $lastname = $vars['lastname']; $email = $vars['email']; $phone = $vars['phonenumber']; $city = $vars['city']; $country = $vars['country']; $postcode = $vars['postcode']; $company = $vars['companyname']; $state = $vars['state']; $params = '?userid='.$userid.'&firstname='.$firstname.'&lastname='.$lastname.'&email='.$email.'&phonenumber='.$phone.'&city='.$city.'&country='.$country.'&postcode='.$postcode.'&companyname='.$company.'&state='.$state.'&source=WHMCS'; $url = 'https://hooks.zapier.com/hooks/catch/zzz/rrrr/'.$params; $options = array( 'CURLOPT_POST' => 0 ); $response = curlCall($url,$postfields,$options); logActivity('logged addClient with params: ' . $params . 'following is the result: ' . $request, $userid); }); I also tried to send this via file_get_contents but it does not seem to work, by composing the url together with real world values gotten from the LOG in the admin area the request works on Zapier's end, I suppose that the problem lies within WHMCS and the request. The Zapier request has been altered for privacy reasons.
      Can anyone point me in the right direction?
    • By Eldremor
      I think the title already say everything. I've been searching on forums, github and other places but I didn't found anything that is working. Can someone help me?
    • By PaulGress
      Hi all,
      i'm newbie with whmcs and i need help to solve a problem. I'm working with whmcs v. 7.x and actually ( not even in 8.x ) there's a way to change hosting price after 1 year, without creating and using a  promotional coupon code .
      So i need that one of my product hosting with pid=70 that it's price 20.00$ could be changed automatically to 30.00$ in Recurring Amount   after 1 year. For only client he's buying it.
      So after client have bought it and paid invoice, hook could work and update Recurring Amount value in hosting product for client...There's a way to perform it with a hook ?
      I'm seeing documentation about whmcs hooks and i found the " OrderPaid " . Something below could be works?
      <?php add_hook('OrderProductPricingOverride', 1, function($vars) { $return = []; if ($vars['pid'] == 70 { $return = ['recurring' => '30.00',]; } return $return; }); Thanks for any help.
    • By Kian
      Client group background colors no longer display on ticket view page. Go figure out why WHMCS decided to remove it from v8. This action hook puts the styling back.

      Get the Code »
  • 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