jeebee123 Posted September 28, 2022 Share Posted September 28, 2022 Hi! So, we're having a problem with a client which has chargeback the automatic payments. Is there a way to disable access to the client area, untill the payments have been received? So that the client is able to make a payment, but can't access services. 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted September 29, 2022 Share Posted September 29, 2022 You would need to make a hook that checks if the user has an unpaid invoice and if so, automatically redirect to the invoice on all pages (don't make the hook execute on the invoice itself, though, and probably also disable it on support pages and such). 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted September 29, 2022 Share Posted September 29, 2022 3 hours ago, DennisHermannsen said: You would need to make a hook that checks if the user has an unpaid invoice and if so, automatically redirect to the invoice on all pages (don't make the hook execute on the invoice itself, though, and probably also disable it on support pages and such). May run into the issue if the client has multiple unpaid invoices, which one would they be redirected to? Perhaps a redirection to the invoice page would work, but all payment related pages would need to be whitelisted in the hook. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted September 29, 2022 Share Posted September 29, 2022 There is a module who can hide individual products from the Client Area per Client. You must then manually unhide the product, when the Client pays. Is that how you want it? 0 Quote Link to comment Share on other sites More sharing options...
jeebee123 Posted October 3, 2022 Author Share Posted October 3, 2022 On 9/29/2022 at 8:00 PM, web2008 said: There is a module who can hide individual products from the Client Area per Client. You must then manually unhide the product, when the Client pays. Is that how you want it? Hmm, that would be to much work. It would be best to just disable access to the client area, except the invoices. There are clients with 200 domains, would be a lot of work to hide all of this domains. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 3, 2022 Share Posted October 3, 2022 What about this? Maybe it still works. Haven't tested! 0 Quote Link to comment Share on other sites More sharing options...
jeebee123 Posted October 3, 2022 Author Share Posted October 3, 2022 15 minutes ago, web2008 said: What about this? Maybe it still works. Haven't tested! Looks good, I've uploaded it into the hooks directory, doesn't work :(. If I look into the code, I thought it would work. But for some reason it doesn't. 0 Quote Link to comment Share on other sites More sharing options...
jeebee123 Posted October 3, 2022 Author Share Posted October 3, 2022 Ah nevermind. It works. Only this function doesn't work: add_hook("ClientAreaPage", 1, function($vars){ add_hook("ClientAreaPage", 1, function($vars){ /** * Overdue Invoices Limit * * If client has overdue invoices more than this number a restriction will be applied * Default is 0, mean if client has 1 or more overdue invoices */ $overdueInvoicesLimit = 0; The invoices limit dont work. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 3, 2022 Share Posted October 3, 2022 When I test on WHMCS 8.5.1 it works! 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted October 3, 2022 Share Posted October 3, 2022 If using friendly URLs, that may not work as the "action" _GET variable is missing in many URLs now. 0 Quote Link to comment Share on other sites More sharing options...
Fringe Posted February 16, 2023 Share Posted February 16, 2023 Does anyone still have this? I can't get the link to work and I would like this please. Thank you 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted February 19, 2023 Share Posted February 19, 2023 (edited) I wrote this a few years ago. Just tried it on 8.6 and it still works like a charm If client has an overdue invoice (with grace period added), it doesn't block them from the client area (you don't really want that), it simply redirects them to the invoice page so they can pay it. Unzip, upload php to includes/hooks/ and you're good to go. unpaid_invoices.zip Edited February 19, 2023 by twhiting9275 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.