I am creating a plugin to interact with WooCommerce.
Currently, if I want to create a product I need to generate API credentials in the WooCommerce settings and add those credentials into a form in the menu page created by my plugin which is then, in turn, saving them as
wp_options and then accessing them when I connect to the WooCommerce rest API.
These seem like too many steps to follow for anyone else who is using the plugin and might not be too familiar with WordPress.
Is there a way to programmatically generate these credentials or even interact with WooCommerce without these credentials altogether?
This plugin will only run on WordPress and any data in it will remain on the domain it is installed. There will be no external API calls only to the WooCommerce installed on the same WordPress my plugin is installed on.
I managed to create the keys automatically with the WooCommerce auth endpoint but I can't get the keys from the callback url.