PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

save data in database

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi

we want to fire a function which save some data in database when the regular or sale price changes.
is there any action to do this?
==============================
function name: sc_price_chart_bulk_todb
we want to add an ajax call to this function and save data in DB.
these variable must be sent to function:
post_id
product_type
term_id
_regular_price
_sale_price

which post id is simple product id or parent id of variable product
product_type: simple/variable
term_id: variation_id
==============================
best regards

Hello

You can  use  this  hook - woobe_before_update_product_field

add_filter('woobe_before_update_product_field', function($value, $product_id, $field_key) {

//example
if ($field_key === '_regular_price' ) {
//Add  some data in database
}

return $value;
}, 10, 3);

where I can add this?

Hello

In functions.php of your child theme - https://wpfactory.com/blog/how-to-add-custom-php-code-in-wordpress/

Let me clarify my issue. On my website, there is a price history chart, and when I change the price using your plugin, it does not update in the chart. This is my problem.
https://ahanalat.com/p/beam-12-esco/

Hello

ok! On my part, I have given all the information. Unfortunately I don't know how your third-party functionality works.

This code will work when you change prices using my plugin. Inside this code you should insert your custom code