WP Product Review how to change dynamically the image size for review

In order to display the image thumbnail in the review box we are using the 'thumbnail' image setting, which usually is 150x150, the easiest thing to change that is to go in Settings->Media, do it and then Force Regenerate Thumbnails (!!! Please continue to read) 

If your theme use a different value is probably needing it for something ( like frontpage image boxes ) and in case you change those, you can break your site.

In this situation you will need to add a new image size in functions.php and then use a filter to pass it to our plugin.

1. Add Image size 

add_image_size( 'new-size', 150, 150, true ); //(cropped)

2. Then you can use the    wppr_review_image_size filter. Here you have a code snippet that will do the trick.

add_filter( 'wppr_review_image_size','wppr_review_image_size_filter_demo',10,2 );
function wppr_review_image_size_filter_demo($post_id ) {
 	 //change the image size according to your needs;

	return "new-size"; //this is the actual name of the new size