I'm setting up an online store for a client and building a custom product filter (they have 9000+ products).
The client wishes to have the filter cascade, i.e. if you select a certain attribute, it will hide/disable attributes that are no longer possible.
One way to do this would be to make an API call to WooCommerce and pull a list of products every time a user updates the filters, but I don't want to hard-code the API key in the front-end code. This would be a major security issue as any could potentially pull all customer info from the database.
How can I securely query the WooCommerce API without exposing this API key? I am open to alternative solutions to the original issue as well.