{"id":12500467,"date":"2020-03-02T19:27:14","date_gmt":"2020-03-02T19:27:14","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/api-rest-woocommerce\/"},"modified":"2020-03-02T21:24:26","modified_gmt":"2020-03-02T21:24:26","slug":"api-rest-woocommerce","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/api-rest-woocommerce\/","title":{"rendered":"API REST Woocommerce"},"content":{"rendered":"<p>I generated a WordPress plugin that uses Api rest Woocommerce to send products and orders data to external marketing platform. Currently, it is in my development environment.<\/p>\n<p>This plugin connects to an external marketing platform. But, I try to change the person who installs my custom plugin does not need to have to go to the WooCommerce plugin settings to enable the API REST and get a consumer key and secret for put on my custom plugin (this must be resolved in the background process for the common person. Otherwise, there are many steps).<br \/>\nI want to solve it automatically by code when the person installs\/activate my custom plugin. Can someone tell me how from the code of my plugin I can activate the REST API Woocommerce and get a new consumer key and secret for use in my custom plugin?<br \/>\nThanks.<\/p>\n","protected":false},"template":"","class_list":["post-12500467","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12500467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12500467\/revisions"}],"predecessor-version":[{"id":12500800,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12500467\/revisions\/12500800"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12500467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}