All the data like different prices of a product custom post type are store (for each product) in postmeta table.
To find the post id of all products you have to use this query on posts table:
SELECT * FROM 'posts' WHERE 'post_type' = 'product'
For each product id (post_id
), you can retrieve all related data with this query on postmeta table:
SELECT * FROM 'postmeta' WHERE 'post_id' = nnnn
(nnnn is the number id (post_id
) of a product)
You will get the list of all product properties metakey
and metavalues
.
For related price meta_key
(s) you have, for example:
– _regular_price
– _sale_price
– _price
– …
To get a particular value of a product meta_key, you can use the wordpress function:
get_post_meta($post_id, '$meta_key');
Related Posts:
- WooCommerce: How to edit the get_price_html
- Get woocommerce product price by id [closed]
- single-product.php template not working for single products [closed]
- Optimizing Woocommerce order items query
- WooCommerce Template overriding not working with woocommerce.php
- How do you add a custom function to add / update product?
- Set a specific default stock quantity on all WooCommerce new products
- Shipping Location based on IP (Geolocation)
- Is there a Woocommerce hook that fires when applying a coupon but before checking if it’s valid?
- How to search Woo Commerce products with punctuation in title?
- How to unhook a function in Woocommerce Template?
- woocommerce “publish “”product”” webhook
- Disable Woocommerce product tags display by alphabetical order
- Hide Price on one specific Woocommerce Single Product page [closed]
- Change WooCommerce PayPal Built-in Default Order Status
- Woocommerce and Pricing deals plugin total price update with AJAX
- Send a value to woocommerce with a button type submit
- Breadcrumbs on Product Page Always Show Wrong Product [closed]
- Modify SKU for display on product page
- Permalinks contain unwanted space resulting in broken links
- WP_Query with meta_query for children
- WooCommerce Display Digital Download Files Type and Size
- woo commerce get all orders item given category
- Add Stripe Connect data to wc_stripe_payment_request
- WooCommerce get default shipping rate & conditions
- Woo commerce+ Stripe – How to associate one account per currency [closed]
- WooCommerce – Stock in Decimals, Using Quantity Intervals with Unique Prices [closed]
- Sort & Display WooCommerce Product Attributes by Order
- Adding product info for printing to custom Woocommerce Product Display tab [closed]
- WooCommerce Cart Link based on Cookie Values
- Woocommerce is_shop not on page slug? [closed]
- WooCommerce – Trigger Checkout Form Validation
- Add shipping address to Woocommerce order emails [closed]
- A function to add arguments to a taxonomy
- add sub subpage endpoint to woocommerce plugin my-account section
- Show Content On below single product with specific category
- How to change a WooCommerce Subscription Deposit and Monthly Payment? [closed]
- how to change the “return to shop” button text? [closed]
- how to scrolling image on single product page
- How to display WooCommerce product tag names on home and category pages
- Problem while adding the variable product woocommerce
- How do I create a filter to hide the One Click Accessibility plugin button in WordPress?
- customers are not showing up in woocommerce
- Woocommerce pre_get_posts query variation meta data not working
- Can’t hide product attributes with css on WooCommerce Product Page
- Updating product image
- Woocomerce Edit source code of form in wordpress
- Single Product Page as a Popup
- Woocommerce to get restaurant table numbers in the checkout fields from the url
- Woocommerce : How to automatically input the same email for every order?
- Woocommerce – Change order of products in Confirmed Order
- echo product parent category
- How to edit wc_get_template_part for archive products
- Switch to user link shortcode
- UX Builder not loading for product description edits
- Display WooCommerce product attribute on shop page
- How to get product category ID based on post?
- Jump to Footer On Scroll – Woocommerce Pages Phones Only
- WordPress Development Workflow
- Woocommerce redirection product_name -> product_cat/product_name
- Custom account page that accepts a query parameter
- Custom WooCommerce template for product
- Checkout fr Woocommerce – load default WooCommerce checkout template on the fly
- Loop Through Current Woocommerce Product Categories Sub Categories
- why my price is not showing while adding new product?
- How to send Woocommerce Customer Details (Name, Email and Phone Number) to Admin upon signup
- Sending billing details via POST request to an API
- Two types of product categories on shop page
- Remove username and account password field from checkout page
- How to send an invoice with details to the customers
- Tax exclusive if coupon applied else tax inclusive in items
- WooCommerce Registration, Sync User, Billing and Shipping info
- HTTP Error when uploading pictures and problem with the size of images
- add_rewrite_rule() returns 404 page
- How to change “add to basket” button text in WooCommerce based on product category?
- Select all product woocommerce
- Woocommerce REST API: creating variations
- Woocommerce Setup not completing
- woocommerce: when adding or removing items to cart , it takes cart a few seconds to read changes?
- When to use a child theme for WooCommerce Storefront?
- WooCommerce: Bulk Quantity in Cart
- WooCommerce – Adding Product Attributes to CSV Export
- Unable to enocde the result of wc_get_products
- Remove Span Class From Woocommerce Price
- Woocommerce shows empty columns [closed]
- Product atributes in title of order (not in description)
- How to create custome pdf file of my invioice in wordpress
- How to get sub items of parent menu item?
- WordPress and WooCommerce How to Assign Attribute Based Pricing
- Notice: Trying to get property of non-object in bodycenter [closed]
- WooCommerce remove billing detail completly
- unable to get product by category only getting product added lastly
- Storefront Child Theme show product attribute [closed]
- How to dublicate WC Product title to shortdescription field? [closed]
- Add Additional 3 buttons next to “Add to cart” button in woocommerce product page
- Create bookings after subscription renewal
- Change variants URL
- Use a woocommerce hook to create a table and populate it with a query
- Woocommerce product and category in url [closed]
- Display product categories + child-categories on a single product page