Hello,
I have a file /includes/hooks/hooks.php with the following code:
<?php
add_hook('ClientAreaPage', 1, function($vars) {
var_dump("ClientAreaPage");
});
add_hook('AdminAreaPage', 1, function($vars) {
var_dump("AdminAreaPage");
});
add_hook('PreRegistrarGetDNS', 1, function($vars) {
var_dump("PreRegistrarGetDNS");
});
add_hook('AfterRegistrarGetDNS', 1, function($vars) {
var_dump("AfterRegistrarGetDNS");
});
add_hook('PreRegistrarSaveNameservers', 1, function($vars) {
var_dump("PreRegistrarSaveNameservers");
});
add_hook('AfterRegistrarSaveNameservers', 1, function($vars) {
var_dump("AfterRegistrarSaveNameservers");
});
add_hook('AfterRegistrarGetContactDetails', 1, function($vars) {
var_dump("AfterRegistrarGetContactDetails");
});
add_hook('PreRegistrarGetContactDetails', 1, function($vars) {
var_dump("PreRegistrarGetContactDetails");
});
I am trying to execute some of the above hooks, but only ClientAreaPage and AdminAreaPage are called when I visit any page of clientside or adminside.
I know that PreRegistrarGetDNS, AfterRegistrarGetDNS, PreRegistrarSaveNameservers, AfterRegistrarSaveNameservers, AfterRegistrarGetContactDetails and PreRegistrarGetContactDetails are only called in few actions, for example when the domain register is getting the nameservers, contact details or saving dns records so I go to any admin domain page to force these hooks but sadly they are never called.
I also have few breakpoint in the code but the debuger only stops at ClientAreaPage and AdminAreaPage hooks.
Is anyone having this issue? My WHMCS version is 7.1.1