fix: don't show cimo notice if premium#3663
Conversation
WalkthroughAdds Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Pull request artifacts
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/components/image-control2/index.js (1)
91-117: Cimo notice skip condition correctly extended for pro installsThe updated condition:
if ( isPro || ! cimo || cimo.hideNotice || cimo.status === 'activated' ) { return }correctly short‑circuits the effect for pro users, so the Cimo download notice will never be loaded/rendered in premium, while preserving the existing checks for missing Cimo, hidden notice, or already‑activated status. Given
isPro/cimoare effectively config‑like globals, keeping the empty dependency array is fine here.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/image-control2/index.js(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: PHP 8.2 and WP 6.6.2
- GitHub Check: PHP 8.2 and WP 6.7.2
- GitHub Check: PHP 7.3 and WP 6.5.5
- GitHub Check: PHP 8.2 and WP latest
- GitHub Check: build
- GitHub Check: PHP 7.3 and WP latest
- GitHub Check: PHP 8.2 and WP 6.5.5
🔇 Additional comments (1)
src/components/image-control2/index.js (1)
14-16: ConfirmisProexport shape and usageImporting
isProalongsidei18nandcimolooks consistent, and the new usage in the effect matches the PR goal (gating the notice for pro installs). Just make sure that:
isProis indeed exported as a boolean/flag (not a function) fromstackable.- Other call sites (if any) use it in the same way so behavior stays consistent.
If
isProis a function, this should beisPro()instead, otherwise the notice will be skipped for everyone.
fixes #3659
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.