This hook works well, but for my use case I need something else.
Essentially I want to show the products and cart but no other page other wise. The reason is that I have my own custom frontend (not built using whmcs templates) and I want to redirect the user to that custom page if that customer isn't logged in except in the case they want to see the products and subsequently the cart. Adding "index" in the valid pages also allows the user to see the login page of whmcs which I do not want. The user should only see my custom page which has the login, signup, e.t.c functionality already implemented.
Can someone help with updating the above hook.
Thanks in advance