ibrahimduran Posted February 7, 2015 Share Posted February 7, 2015 function hook_test_hook($vars) { return "<li>test</li>"; } add_hook("ClientDetailsValidation", 1, "hook_test_hook"); What's wrong with this code? I have tried adding it to hooks.php hook.php and my main addon file. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted February 7, 2015 Share Posted February 7, 2015 you need to place it inside modules/addons/yourmodule/hooks.php file, also it will only run when adding new client to the system from admin/client area, anyway your code looks clear nothing wrong here, but maybe you need to enable "Display Errors" to see error messages when occurs 0 Quote Link to comment Share on other sites More sharing options...
ibrahimduran Posted February 7, 2015 Author Share Posted February 7, 2015 I tried to register from clientarea after enabling display errors and hooks debug from admin area but any validation or script error didn't occur. 0 Quote Link to comment Share on other sites More sharing options...
ibrahimduran Posted February 7, 2015 Author Share Posted February 7, 2015 The problem is solved by adding the php closing tags (?>) to end of the file. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.