Skip to content

Fix #1044: update the WP Rocket banner copy on the bulk page - #1267

Merged
Miraeld merged 2 commits into
developfrom
fix/1044-wpr-banner-copy
Sep 1, 2026
Merged

Miraeld merged 2 commits into
developfrom
fix/1044-wpr-banner-copy

Conversation

@Miraeld

@Miraeld Miraeld commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #1044

Updates the WP Rocket banner copy on the bulk optimization page to the wording @raahulbasu confirmed with Marketing:

Main copy: "Discover the best performance optimization plugin at 20% off. Make your site even faster."
CTA: "Get WP Rocket Now"

Copy only. No logic, no display conditions changed.

Type of change

  • New feature (non-breaking change which adds functionality).
  • Bug fix (non-breaking change which fixes an issue).
  • Enhancement (non-breaking change which improves an existing functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as before).
  • Sub-task of #(issue number)
  • Chore
  • Release

Detailed scenario

What was tested

Verified in the browser on the real bulk optimization page, not by reading the diff. Read back from the rendered DOM:

.imagify-rkt-msg     -> "Discover the best performance optimization plugin at 20% off. Make your site even faster."
.imagify-rkt-cta a   -> "Get WP Rocket Now"

Rendered banner measures 1593x92, against the 1656x95 in the issue screenshot, which confirms this is the element the ticket is about.

Screenshot of the rendered banner is attached in a comment below.

Integration suite: 149 tests / 403 assertions. PHPCS clean.

How to test

  1. A site without WP Rocket installed (the notice returns early if it is present).
  2. The wp-rocket notice must not be dismissed for your user. If you have dismissed it, clear it from the _imagify_ignore_notices user meta.
  3. Go to Media > Bulk Optimization.
  4. The full-width WP Rocket notice at the top should read the new copy, with a Get WP Rocket Now button.

Affected Features & Quality Assurance Scope

  • The WP Rocket promo notice on the bulk optimization page (views/notice-wp-rocket.php).
  • The settings-page sidebar heading text domain (views/part-rocket-ad.php), see below.
  • Three translatable strings change, so translations for them need refreshing.
  • No change to when the banner shows, to its dismissal behaviour, or to the WP Rocket URL.

Technical description

Documentation

The banner is views/notice-wp-rocket.php, the full-width admin notice rendered on the bulk page. Notices.php:91 maps 'wp-rocket' to the 'bulk-optimize' screen.

Worth recording, since it is an easy trap: there is a second WP Rocket block, views/part-rocket-ad.php, in the settings-page sidebar. I initially changed that one. It is a different placement with different copy, and the ticket is not about it, so it is untouched here apart from the text-domain fix below.

The percentage is interpolated from a $discount_percent variable rather than written into the sentence, mirroring what part-rocket-ad.php already does. That keeps one place to change the figure, and a future offer change does not require rewriting a translated string.

Second commit: text domain fix

views/part-rocket-ad.php:26 passed 'corporate' as the text domain instead of 'imagify', so "We recommend for you" never matched a translation and always rendered in English regardless of locale.

Unrelated to the copy change and in the other file, but it is a one-word defect found while tracing which banner the ticket meant, and folding it in was agreed rather than opening a separate ticket for it.

New dependencies

None.

Risks

  • Translations. Three strings change, so those fall back to English until retranslated. Unavoidable for a copy change.
  • The 20% figure is now stated in the message rather than the button. If the offer changes, update $discount_percent in views/notice-wp-rocket.php; the sentence adapts automatically.
  • No conditional logic touched, so there is no change to who sees the banner or when.

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.
  • Output messages (errors, notices, logs) are explicit enough for users to understand the issue and are actionnable.

Unticked items justification

No automated test added: the change is static translatable text in a view, with no branching to cover. It was verified by rendering the real page and reading the strings back from the DOM, which is stronger evidence here than asserting a string constant against itself.

Additional Checks

  • In the case of complex code, I wrote comments to explain it.
  • When possible, I prepared ways to observe the implemented system (logs, data, etc.)
  • I added error handling logic when using functions that could throw errors (HTTP/API request, filesystem, etc.)

Not applicable: static copy in a view template, no I/O and nothing that can throw.

Copy confirmed with Marketing by @raahulbasu on the issue:

  Main copy: "Discover the best performance optimization plugin at 20% off.
              Make your site even faster."
  CTA:       "Get WP Rocket Now"

The banner is `views/notice-wp-rocket.php`, the full-width admin notice rendered
on the bulk optimization page - `Notices.php:91` maps 'wp-rocket' to the
'bulk-optimize' screen. It is not the WP Rocket block in the settings sidebar
(`views/part-rocket-ad.php`), which is a different placement and is left alone.

The percentage is interpolated from a `$discount_percent` variable rather than
written into the sentence, mirroring what part-rocket-ad.php already does, so
the figure has one place to change and a new offer does not require rewriting a
translated string.
`views/part-rocket-ad.php:26` passed 'corporate' as the text domain instead of
'imagify', so "We recommend for you" never matched a translation and always
rendered in English regardless of locale.

Unrelated to the banner copy in #1044 - different file, different placement -
but found while tracing which WP Rocket banner the ticket meant, and it is a
one-word fix in the same area.
@codacy-production

codacy-production Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

🟢 Coverage ∅ diff coverage

Metric Results
Coverage variation Report missing for 51937131
Diff coverage ✅ ∅ diff coverage (50.00%)

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (5193713) Report Missing Report Missing Report Missing
Head commit (cad9f05) 20485 1622 7.92%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1267) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@Miraeld
Miraeld force-pushed the fix/1044-wpr-banner-copy branch from 7f622cd to cad9f05 Compare September 1, 2026 23:27
@Miraeld Miraeld self-assigned this Sep 1, 2026
@Miraeld
Miraeld added this pull request to the merge queue Sep 1, 2026
Merged via the queue into develop with commit 3e9f02b Sep 1, 2026
24 of 26 checks passed
@Miraeld
Miraeld deleted the fix/1044-wpr-banner-copy branch September 1, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WPR banner text needs to be updated in bulk page

1 participant