wp-rocket
wp-rocket copied to clipboard
Fixes #6972 Prevent injecting Beacon script when DONOTROCKETOPTIMIZE is defined
Description
Fixes #6972 Prevent injecting Beacon script when DONOTROCKETOPTIMIZE is defined and allow SaaS visit
Type of change
- [x] Bug fix (non-breaking change which fixes an issue).
Detailed scenario
Steps are available in the issue https://github.com/wp-media/wp-rocket/issues/6972
Technical description
Documentation
Check for DONOTROCKETOPTIMIZE
before injecting beacon and check if it's visit for SaaS
Mandatory Checklist
Code validation
- [x] I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
- [x] I triggered all changed lines of code at least once without new errors/warnings/notices.
- [x] I implemented built-in tests to cover the new/changed code.
Code style
- [x] I wrote a self-explanatory code about what it does.
- [x] I protected entry points against unexpected inputs.
- [x] I did not introduce unnecessary complexity.