wp-rocket
wp-rocket copied to clipboard
Extract minify from option function to prevent a bug with minify JS
Description
Fix a problem where minified JS where created and deleted right after creating 404 errors.
To fix this the logic to delete minify JS has been moved to a Subcriber and removed from the rocket_after_save_options
function.
Fixes #2973
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
Is the solution different from the one proposed during the grooming?
No, the solution was right
How Has This Been Tested?
- [x] Automated tests
- [x] Manually on local env
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules