• Resolved luisarco

    (@luisarco)


    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)
  • Hi @luisarco

    Thanks for reaching out!

    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

    As a first step, can you please share with us how membership was added to your site as this is not part of the core functions of WooCommerce?

    By any chance, if you are referring to the premium plugin WooCommerce Memberships and you have a valid license with us, can you please open a support request for us to investigate further about your issue?

    Otherwise, if this was from a third-party plugin, it would be best to reach out to the developers for further assistance here.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘How to hide API key?’ is closed to new replies.