I have configured taxes in Woocommerce (with the plugin EU/UK VAT Compliance for WooCommerce). This plugin configures them inside Woocommerce, see screenshot (yes, the menu’s are in Swedish, but you get the point). So where are the taxes stored? The sql table woocommerce_tax_rates isn’t there, see screenshot. But the tax rates are clearly stored somewhere since they are visible in
Tag: woocommerce
MySQL query to update field in a table based on value of other field in same table
I’ve been trying to figure out the correct query for the following issue and I cannot seem to find the solution myself. I’m running a WooCommerce store which stores a bunch of values as ‘meta_key’ in a MySQL table with the value stored in the ‘meta_value’ column. What I want to do is update the ‘meta_value’ of ‘meta_key’ ‘pisol_exact_lot_arrival_date’ to
WooCommerce sql query to find products with a specific meta key and meta value
I am trying to get products with a custom field with value condition from DB. Custom field is named: “_filtered_product”. I want to get products only with value = 1 This is SQL query I have written. Answer Not sure why you want to write your own sql query for this simple task, while you could use wp_query! That being
Get WooCommerce single products data from database with a SQL query
I am trying to get the raw data from the database for the woocommerce_single_product_summary in woocommerce. I need to use the data externally, but I cannot figure out how this is placed in the database, I can gather everything else I need with: Answer To get the correct desired meta keys from wp_postmeta table, you will have to look at
Get products with specific attribute term and specific category term in Woocommerce using SQL
I wish to find products with two different criteria. The code I used first to search one criteria is; This returns all those products (Object_ID) with the attribute “pa_1_scale” and ts.term_id = 400. I can also do this to return all products with product_cat and ts.term_id = 397, using a different WHERE statement UNION ALL just combines the two. How
MySQL – summing up products from several orders
I want to sum up the number of items purchased from several orders. I have this query, however it shows me each order on a separate row. I want have it all added up in one row. This is woocommerce database. Example output: and this is how it should be: Answer You want the aggregation string over all those items,
Extend WooCommerce product search to custom taxonomies and custom fields
I am creating advance woocommerce search and I want to add sku and product_tag and product_category in search query. Below I am using Enable custom taxonomies in WooCommerce product search answer code,…
Is it possible to change a WordPress/woocommerce title that is written with uppercase to appear capitalized?
I am currently working on a project that is based on WordPress and as an e-commerce platform, it uses WooCommerce. I made a product migration from an old site that has the product titles written in uppercase. Currently I have this html code for the titles inside a product: So I want the product title to appear like “Product Title”.
SQL SELECT query to get stock qty does not return value in function ( but does from phpMyAdmin)
I am running this code in a function in Wordpress/Woocommerce to update stock values to the wp_stock_log table when I manually edit stock levels. I am attempting to get the most recent ‘qty’ value for the product and then set it as var $old_qty. I then want to insert it into the table in a new row as ‘old_qty’ so
Support needed for a query
I need help to finish a SQL Query for a Woocommerce product list. I need this for a wpdatatable sql input. I searched for a example code and have adapted a found code: SELECT p.ID, p.post_title, …