Accessing WooCommerce database
-
I am using WooCommerce for a small online marketplace. I am wondering if WooCommerce database is accessible to the admin/owner of the website? If it is, where can I have data schemas for the database?
I did take a peek into the database and found woo related tabble. However, i suspect there are more things. For instance, i did not find any “payment” related table.
Thanks for advices
JZ
-
There’s only one database and that is the WP database. WC is a plugin/module built for WP.
I’m not sure what you’re looking to do exactly but depending on the database and WC settings there would be a table called woocommerce_payment_token and _meta in the DB.
For those businesses that do not save Credit Card info you will not see any of that info.
The row is usually the last items in a clean well maintained DB.
As stefsternyc stated. Its all in one database. Most of the information you are looking for will be in woocommerce_{table_name}.
However, credit card information should NEVER be saved to the DB directly. The legal backlash on this should the site ever get hacked/information get leaked….
Stripe and other payment gateways use tokenization to reference that information within their own systems.
@mtruitt – the card information can be stored in the same database but it is encrypted by the token. The option is in WC to give your customers the ability to save their card information for future purchases.
However, you must have an account and be verified by Transarmor before you can even attempt to do this.
@stefsternyc – for future reference then you may want to include that when stating/mentioning saving credit card information as what the person reading that statement can take it as.
As well, WC by default does nothing with CC information. That is all provided by the payment gateway and is unique to individual ones as not all offer the option to store for future use.
@mtruitt – Ok so English is not my first language but please, don’t jump on someone that does this for a living. I explained it as best I could and it made sense to everyone but you.
Yes, it is based on the payment gateway but that’s pretty clear as you can’t see jack without having a payment gateway. However, most offer it.
@stefsternyc – Please heed your own advise then and don’t assume. Most people that come to the forums are owners/users and not developers. Assuming they “know” for someone that does this for a living is not something you can afford to do easily.
Also please don’t be so soft to assume that you are getting “jumped” for someone making a correction to something you posted.
However, I will not continue this and bog down/hijack this post over your feelings getting hurt for me clarifying regarding payment gateways and storing CC information directly in a database.
@mtruitt – My feelings are far from hurt Mark. I advise numerous companies including the gov’t on security and help hundreds of people for FREE daily. I don’t need some richard like you telling me jack. Just because I can’t write in perfect sentences or plain english for you doesn’t give you the right to jump on someone. I’ve been doing this since before you were born.
You racist
@zhuzh1 – Best of luck and sorry about hijacking your post. Feel free to DM me on slack if I can be of anymore help.
@stefsternyc – Enjoy trolling yourself.
-
This reply was modified 6 years, 5 months ago by
Jan Dembowski.
Thanks for everyone’s contribution to this thread.
I am wondering if WooCommerce database is accessible to the admin/owner of the website?
Just the database is only assessable directly through your web host. Data is obtained by different plugins and features but only if that plugin contains the necessary code to read from the database, or record to it.
I did take a peek into the database and found woo related tabble. However, i suspect there are more things. For instance, i did not find any “payment” related table.
As mentioned by the community above, this information is tokenized by payment gateways – or at least should be. This means the data can only be read by the payment gateway and actual card information is stored on their system, rather than the WordPress database.
Feel free to let us know if you have any further questions.
Thanks again,
modlook: would you mind removing some of the discussions above? ??
No, but I will remove the
modlook
tag that mtruitt added it when the report link was clicked.mtruitt, I’ve re-read your replies and you have not represented yourself well. I’m sure you didn’t mean to be rude but here we are. Please refrain from that again.
Thanks to everyone who engaged in the discussion above.
I did a “show tables” in the database, I got a list (see below, I removed the
prefix in the table names so they are easy to be read).Intuitively, I expected something like Orders, Products, Coupons in the tables names.
Besides, order_items, I found none of these importants entities in Woo. That was the reason I brought up the question in the first place.Did I miss anything? If not, where can I find list of orders, products, coupons etc?
Thanks again
JZ
————- List produced by “Show tables” in mySQL ————-
commentmeta
comments
failed_jobs
links
mailchimp_carts
oauth_access_tokens
oauth_authorization_codes
woauth_jwt
oauth_public_keys
oauth_refresh_tokens
oauth_scopes
options
postmeta
posts
queue
social_users
term_relationships
term_taxonomy
termmeta
terms
usermeta
users
wc_download_log
wc_webhooks
wcpv_commissions
wcpv_per_product_shipping_rules
woocommerce_api_keys
woocommerce_attribute_taxonomies
woocommerce_downloadable_product_permissio…
woocommerce_log
woocommerce_order_itemmeta
woocommerce_order_items
woocommerce_payment_tokenmeta
woocommerce_payment_tokens
woocommerce_sessions
woocommerce_shipping_zone_locations
woocommerce_shipping_zone_methods
woocommerce_shipping_zones
woocommerce_tax_rate_locations
woocommerce_tax_ratesHi
WooCommerce is dependant on WordPress core so you’ll find product data in the same
wp_posts
andwp_postmeta
tables as posts and pages. I found an article that breaks this down a bit further:https://docs.woocommerce.com/document/bundles/bundles-data-structures-storage/
Hope that helps,
-
This reply was modified 6 years, 5 months ago by
- The topic ‘Accessing WooCommerce database’ is closed to new replies.