there is a way to apply this function only on woocommerce post type?
function reset_post_date_wpse_121565($data,$postarr) {
// var_dump($data,$postarr); die; // debug
$data['post_date'] = $data['post_modified'];
$data['post_date_gmt'] = $data['post_modified_gmt'];
return $data;
}
add_filter('wp_insert_post_data','reset_post_date_wpse_121565',99,2);
I need to reset only woocommerce product after update.
for wp_insert_post_data filter, just compare the post type to the cpt.