Quantcast
Channel: WooCommerce prices location in DB - WordPress Development Stack Exchange
Viewing all articles
Browse latest Browse all 5

Answer by Umair Idrees for WooCommerce prices location in DB

$
0
0

Ηere are three meta_keys in postmeta table.

[ _sale_price, _regular_price, _price ]

First array contains value and second array contains WHERE condition. You can add more conditions.

You can update values using the following code.

//update _price$wpdb->update(     $wpdb->postmeta,     array( 'meta_value' => $default_product_price ),     array( 'meta_key' => '_price' ));//update _regular_price$wpdb->update(     $wpdb->postmeta,     array( 'meta_value' => $default_product_price ),     array( 'meta_key' => '_regular_price' ));//update _price$wpdb->update(     $wpdb->postmeta,     array( 'meta_value' => $default_sale_price ),     array( 'meta_key' => '_sale_price' ));

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>