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
- How to address an invalid “NOT IN ()” query?
- Product reviews in my sql database
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- What is the difference between “INNER JOIN” and “OUTER JOIN”?
- What is the difference between “INNER JOIN” and “OUTER JOIN”?
- ORA-00904: invalid identifier
- Self Join to get employee manager name
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- What is “Advanced” SQL?
- Why do we need “Relationships” between tables at all?
- Case statement in MySQL
- How to update multiple columns in single update statement in DB2
- How do I restore a dump file from mysqldump?
- TypeError: tuple indices must be integers, not str
- What is the difference between JOIN and UNION?
- Error Code: 2013. Lost connection to MySQL server during query
- how to drop partition without dropping data in MySQL?
- 1052: Column ‘id’ in field list is ambiguous
- 1052: Column ‘id’ in field list is ambiguous
- difference between primary key and unique key
- Creating a search form in PHP to search a database?
- The ALTER TABLE statement conflicted with the FOREIGN KEY constraint
- What is it exactly a BLOB in a DBMS context
- Oracle SQL query for Date format
- What is difference between SQLite and SQL
- The backend version is not supported to design database diagrams or tables
- Simulate CREATE DATABASE IF NOT EXISTS for PostgreSQL?
- Postgres Error: More than one row returned by a subquery used as an expression
- How do I reset a sequence in Oracle?
- MySQL equivalent of DECODE function in Oracle
- what is the difference between triggers, assertions and checks (in database)
- How to do a batch insert in MySQL
- Solutions for INSERT OR UPDATE on SQL Server
- “select * into table” Will it work for inserting data into existing table
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- Woocommerce – Add a product to cart programmatically via JS or PHP [closed]
- WPDB Insert or if exists Update
- ( Woocommerce) How to get the user belonging to an order? [closed]
- Get the product list of a given Category ID
- List of JS events in the WooCommerce frontend
- get woocommerce My account page link
- WooCommerce: How to edit the get_price_html
- Get woocommerce product price by id [closed]
- Product categories don’t appear as option to build menu
- WooCommerce Variable Product Price not showing on single product page
- How to override WooCommerce template files?
- Woocommerce add extra field to variation product
- Getting the gallery images from products in woocommerce?
- How to get current product category ID in product archive page
- WooCommerce prices location in DB
- Order by rating not works in wp_query
- Woocommerce: How to remove page-title at the home/shop page but not category pages
- Woocommerce show cross sells on singe product page [closed]
- How to add a new endpoint in woocommerce
- Are there any hook or filter when refund is done through admin -woocommerce
- How to check if is in cart page? [closed]
- Display single product attribute value on Shop page (Woocommerce)
- WP/WooCommerce REST API cart/checkout/order [closed]
- how to use wc_create_order with subscription product
- WooCommerce: Webhook disabled on its own
- Where are image paths to product category images stored in WordPress database
- Slow Loading Attribute Select – WooCommerce Backend
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- How to change or add Woocommerce thank you page URL key content?
- How can I define a custom template for woocommerce [products] shortcode? [closed]
- How to remove an action within a class with extends
- Getting wrong relationship value in $args in wp_Query?
- single-product.php template not working for single products [closed]
- Insert variations via woocommerce api [closed]
- WooCommerce get physical store address