The code you provided works fine.
The problem must be in the Barn2 Product Table plugin.
I will ask support from Barn2 to solve that issue.
Many thanks for your support, guidance and patience.
I have checked Barn2 for this issue.
The asked me to check with you why the regular price is not visible on the product page. That should be the problem according to them.
Hereby the screen print.
Thanks in advance for your help.
I'm assuming here that you're referring to the 0303CC test product. As the second product on your page does have the regular price set and is displaying on the frontend.
I've made some adjustments to the code. Here is the updated code below.
function func_custom_update_product_regular_price($post_id, $form_data) {
// if a specific form
if ($form_data['id']==15) {
update_post_meta($post_id,'_regular_price', 50);
update_post_meta($post_id,'_price', 50);
}
}
add_action('cred_save_data', 'func_custom_update_product_regular_price', 10, 2);