Jump to content

Hooks


Recommended Posts

first you need to get client id from invoice information, then run extra API to return all client information

<?php

add_hook("InvoicePaid", 1, function($vars){
	
	$adminUsername = ""; //optional for WHMCS v7.2 and later
	
	// Invoice Info 
	$invoice = localAPI("GetInvoice", array('invoiceid' => $vars['invoiceid']), $adminUsername);
	
	// Client Info
	$client = localAPI("GetClientsDetails", array('clientid' => $invoice['userid']), $adminUsername);
	
	// Add your logic here
});

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • 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