Check if the value of a field has changed on save_post
Usually there is no way to check if the meta data is updated or not, but you can use updated_postmeta and added_post_meta to get kinda similar functionality. Please have a look at the below code- add_action( ‘updated_postmeta’, ‘the_dramatist_updated_postmeta’, 10, 4 ); add_action( ‘added_post_meta’, ‘the_dramatist_updated_postmeta’, 10, 4 ); function the_dramatist_updated_postmeta( $meta_id, $object_id, $meta_key, $meta_value ) { … Read more