Instead of connecting to the database directly, wouldn’t it be better to use the WooCommerce REST API: https://woocommerce.github.io/woocommerce-rest-api-docs/ ?
Hallo @omersjd
May we ask exactly what you are trying to do so we can help?
Connection credentials are not available within the WordPress core installation.
WooCommerce saves its data in the post table (as a Custom Post Type) and in a number of custom tables within your WordPress database (mySQL or MariaDB, depending on the host), so the credentials would be the same as for your WordPress installation.
You may wish to have a look at these documents: https://woocommerce.github.io/woocommerce-rest-api-docs/
You can also join the #developers channel on the WooCommerce Community Slack: https://woocommerce.com/community-slack/
@carike Thanks for your support.
I’ve a quick question.
my store name is https://qmajd.com
How do I retrieve my all products ?
like I just want to make a simple get request from my application.
for example like below code,
http.get(myStorename.products).
Can you please help me in this regard.
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Moved to Fixing WordPress, this is not an Developing with WordPress topic.
Please ask plugin specific questions in that plugin’s dedicated sub-forum instead.
https://ww.wp.xz.cn/support/plugin/woocommerce/#new-post
Thank, but
I’m still having a little confusion.
I’ve read the docs, but to list all products, docs provide the following code.
WooCommerce.get("products")
.then((response) => {s
console.log(response.data);
})
.catch((error) => {
console.log(error.response.data);
});
what is WooCommerce in above code ?
and where in my code do I need to put my API keys.
Your help is highly appreciated
In short I want to know my stores’s API URL
@retronyska
I didn’t understood, what do you want