How to limit the number of custom posts certain users can publish in WordPress using php script?

Welcome to StackExchange! I made some changes to your code that I pointed out with comments. I’m not sure if this will actually work so you have to try it, and probably your way of echoing the message won’t work because after updating there’s a redirect so you’ll have to work with the admin_notices action … Read more

One Time Access URL after purchasing subscription

A simple solution would be creating a unique token upon purchasing a subscription/product. Save to token somewhere in database. Present the URL to the app passing the token as a GET variable. For eample, www.company.com/app/the-awesome-tool/?token=jvp2HBst5V7iHQeE2twq When accessed, check is the token is there at the database, if not restrict access. Delete the token from database … Read more