You shouldn’t use a SQL query. You can do this programatically.
$price = get_post_meta( $product_id, '_price');
$price += 100; // use -= 100 to subtract
update_post_meta($product_id, '_price', $price);
update_post_meta($product_id, '_regular_price', $price);
Related Posts:
- Get url of product’s images (woocommerce)
- Share users and WooCommerce memberships between two installations
- Is it safe to delete from db orphaned posts i.e. whose post_parent no longer exists?
- Where is the “default attribute” values located in the phpMyAdmin in Woocommerce?
- Get WooCommerce product attribute taxonomies in a SQL query on WordPress database
- How to get all products from an order including variations via SQL query?
- How to Order by random on a SQL query
- How to select from two different tables to display orders list with custom column from other table
- Is it safe to have 2 mysql users?
- Should I use docker in wordpress production?
- get woocommerce product image url and price from database [closed]
- Help me to intergrate product database to WordPress
- Undo WooCommerce CSV import
- WordPress Development Workflow
- Deleted products from woocommerce are still in the database
- Update WooCommerce stock status with SQL query if stock value is greater than 0
- How to get products without tag?
- Woocommerce change the price of products in the database
- Query product’s image path by category WooCommerce database?
- How to speed up “My Account > Orders Page” on Site with More than 200,000 orders?
- Does WP-WooC support filters at database?
- WooCommerce database upgrade behaviour
- Woocommerce order_complete email dont send after changing order status via sql
- PHP Warning: Error while sending QUERY packet
- Use a woocommerce hook to create a table and populate it with a query
- Woocommerce permalink URL change in DB
- Is it possible to extract all product columns except for one?
- Woocommerce plugin increasing Database size
- Converting longtext to mediumtext in WordPress wp_postmeta table
- Show only geolocated user country into Woocommerce checkout country fields
- How to execute mulitple statement SQL queries using $wpdb->query?
- The correct way to override WooCommerce product gallery from a plugin [closed]
- How to have specific prices for some particular pin codes in woocommerce? [closed]
- How do I get the latest note on the order at woocommerce? [closed]
- Woocommerce Login Redirect not working [closed]
- Woocommerce template single-product.php in theme folder not working
- How can i create a WooCommerce product programatically or using sql query?
- How do I find which articles are missing a featured image in The WordPress database?
- Is it safe to update WooCommerce data update?
- Output JSON object with woocommerce products
- Fatal Error in WordPress WooCommerce theme “Call to undefined function wc_get_theme_slug_for_templates()”
- differentiate hooks and filters on the same page [closed]
- Signup Form that adds customer to MailChimp, redirects to checkout, and fills in form data
- how to pass a woocommerce product name to contact form7 [closed]
- Woocommerce Subscription Pricing/Billing Schedule
- ‘profile_update’ hook alternative for WooCommerce user meta data
- How to add a user custom field into Woocommerce emails?
- Hook to use when customer placing order
- Woocommerce Rest Api Categories problem [closed]
- wc-ajax=get_variation slow speed in WooCommerce
- Add custom CSS class to product images
- Maintenance mode just for WooCommerce shop pages [closed]
- Custom email template for a specific product category
- update_post_meta not work [closed]
- WooCommerce Registration redirect based on page ID
- Woocommerce Backend Search by Title and SKU
- Location of WP default mySQL tables creation file?
- WooCommerce print subcategory of product
- Woocommerce – sell a certain category by unit, another by weight? How?
- Woocommerce Product permalinks “product” word is not working
- How to automatically change the status of product from draft to published when stock qty change from 0 > 1
- Woocommerce checkout page issue – Payment methods not loading – strange “Credit/Debit Card Secure Payment” form
- Sort products by Sale price and stock status
- Pagination in woocommerce – Limiting page-numbers
- Re-arrange the Woocommerce checkout page layout
- How to sort products by price ASC and place all no price products to the end? (Woocommerce)
- Change order of combined product tabs
- Display notice on WooCommerce emails depending on chosen shipping option
- Impossible to create a new WooCommerce customer using Rest API
- Woocommerce – get daily sales meta
- Check if product variation image is from the variation itself or from the parent
- Will ‘private’ status prevent Woocommerce products to be indexed by search engines?
- How to use products shortcode in taxonomy-product_cat with multiple columns?
- Position WooCommerce basket and pricing
- Display Products Associated with Specific Attribute [closed]
- Notice: Trying to get property of non-object in
- French accented text replaced with ? in woocommerce product list
- Trying to figure out why an error is returned when trying to add an item to the basket on this website
- Conditionnaly replace “Read more” text WooCommerce products
- WooCommerce/Authorize.net interface problem
- Using category and its sub-categories products attributes as filter in products pages
- Change order status after checkout
- Is it safe to update an old site after backing it up and activating a child theme?
- How to add coupon expiry date into the followup emails?
- Correct and secure way to access a custom SQL database in a custom PHP template file
- Disable Woocommerce main shop page, but not the product category archive pages
- access Woo commerce | WordPress methods externally
- Woocommerce set single city to sell to
- Database Query not working
- Trying to link to a custom css file in a new folder
- eCommerce solution doesn’t want to display its shortcodes or any content where it’s set to [closed]
- How do I make a diagonal strikethrough on wordpress? [closed]
- Woocommerce – Remove ‘Buy Product’ Button from shop page [closed]
- Add woocommerce.css in template?
- How to dublicate WC Product title to shortdescription field? [closed]
- Woocommerce product and category in url [closed]
- Woocommerce ajax checkout get wc_checkout_params is not defined
- Struggling with Per-Item Shipping and Classes
- Show Featured products with custom taxonomy template
- Snippet to Log “Payment Failed” in Syslog [closed]