How to hide API key?
-
I’m working on a website where I need to check if the current logged in user is in a “free trial” membership in order to hide a feature of the website. But for this code to work I need to do an API fetch from the front-end and I have to specify the the API keys in order to perform the fetch.
I tried using an .env file with a function, and printing this function, but it will still display in the page. Is there a way to completely hide this? This would be easier if woocommerce had rules to apply to api keys so it would only be used within the site or add some sort of restriction.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to hide API key?’ is closed to new replies.