End Listing when Pricing Plan Ends

Hi, I managed some code to make this work using your 2nd approach, so many thanks. Unfortunately as it redirects after the load, it reveals the page for a moment too long. So I’ve tried to do this using routers instead. Could you please suggest a solution; my post showing latest attempts- How to Redirect some Dynamic Item pages using Routers