Hi Jose,
good question! I haven’t really thought about that and as you figured out there is at the moment no easy way to reset everything at once.
You could use delete_post_meta_by_key function in custom made plugin or your theme’s functions. I haven’t tested this method but it should work. More about the function here: https://developer.www.ads-software.com/reference/functions/delete_post_meta_by_key/
So your code should look something like this below:
delete_post_meta_by_key( 'rmp_vote_count' );
delete_post_meta_by_key( 'rmp_rating_val_sum' );
delete_post_meta_by_key( 'rmp_feedback_val' );
Another option If you are in development environment, is to add the following code to \rate-my-post\admin\inc\class-rate-my-post-admin-helper.php after line 74 (just before the push to array comment):
delete_post_meta($postID, 'rmp_vote_count');
delete_post_meta($postID, 'rmp_rating_val_sum');
delete_post_meta($postID, 'rmp_feedback_val');
Then you just have to click on Rate my Post in the menu (backend) and everything should be reset ?? Don’t forget to remove the code above after clicking – or just delete the plugin and install it again. I also recommend to do backup of DB before doing this – just in case. I know it’s not ideal but I’ll try to add an option for complete reset in one of the future versions.
Blaz
-
This reply was modified 5 years, 10 months ago by Blaz K..