If your WPRM Stars Rating not working on mobile devices when using WP Rocket, here is the solution that may help you fix this issue.
Issue
WPRM Recipe Maker Stars Rating not working on mobile devices when using WP Rocket. When tapping the stars to rate the recipe, nothing happens.
Reason
There could be two major reasons for it.
First is obvious – you have already rated the recipe. we just had to mention it here. 🙂 Second one – you are using the WP Rocket function to combine Javascript files.
Solution
To eliminate the chance of having already rated the recipe, open the recipe in the Incognito window and try rating there. If it works, then you are all set. If not, let’s see if WP Rocket Optimization Settings are the reason.
WP Rocket Optimization Settings
Go into your WP Rocket plugin settings and choose File Optimization tab. Here is a shortcut if that’s easier – just replace YOURWEBSITE with your real domain:
YOURWEBSITE.com/wp-admin/options-general.php?page=wprocket#file_optimization
Once there, scroll down to Javascript Files section. You are likely to have the following setting checked: Combine JavaScript files.
The easiest way to fix WPRM Stars Rating would be to uncheck this setting but if you do it, you will loose the benefit of combining other JavaScript files. So what we want to do here instead is exclude only WPRM JavaScript files from the WP Rocket optimization. To do it, leave the Combine Javascript files setting checked and:
1. Copy-paste the following into the Excluded Inline JavaScript:
wprmp
2. Then copy-paste the following into the Excluded JavaScript Files:
wp-recipe-maker-premium/dist/public-elite.js
wp-recipe-maker/dist/public-modern.js
/wp-content/plugins/wp-recipe-maker/dist/public-modern.js_X
/wp-content/plugins/wp-recipe-maker-premium/dist/public-elite.js_X
/wp-content/plugins/wp-recipe-maker/dist/(.*).js
/wp-content/plugins/wp-recipe-maker-premium/dist/(.*).js
This is what you will end up with, unless you already have some other exclusions (click the image to increase it):
Now make sure to click Save Changes and clear cache (local and Cloudflare if you’ve got it). Done.
Test
To test if the stars rating is working on mobile devices, open a new Incognito window on your mobile device and try to rate a new recipe.
P.S.
Would you rather have us do it? Send us a message.