Skip to content

Show the on/off toggle for installed Boosts on the Add-Ons page - #3720

Merged
Crabcyborg merged 2 commits into
masterfrom
fix/boost-addon-toggles
Nov 17, 2026
Merged

Crabcyborg merged 2 commits into
masterfrom
fix/boost-addon-toggles

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Installed Boosts were locked on the Add-Ons page with a "Get Boost" button instead of the on/off toggle other add-ons get. The plugin path the API sent for a Boost did not match the folder it is installed in, so Lite never saw it as installed. Lite now matches an installed Boost by its updater download id (active Boosts) or plugin name (inactive Boosts) when the API path misses, and the toggle's Activate/Deactivate buttons send the matched file.

The API now sends folder-style Boost slugs (formidable-bulk-edit instead of bulk-edit), which dropped the default descriptions and icons on every Boost card. Both lookups are now keyed on the current slugs. The short slugs never shipped in a release, so they are removed.

The API still sends formidable-advanced-modals/formidable-advanced-modals.php for Advanced Modals, but its main file is frm-advanced-modals.php. The plugin name match covers it. Once the API path is corrected, get_boost_plugin_file() can be removed.

Testing

  1. Install and activate a Boost (e.g. Celebrations), and install a second one without activating it (e.g. Advanced Modals).
  2. Go to Formidable > Add-Ons/Boosts and open the Boosts category.
  3. Both cards show a toggle, with Celebrations on and Advanced Modals off. Neither shows "Get Boost". Each card shows its own icon and description.
  4. Turn Celebrations off, reload, and confirm it is inactive on the Plugins page. Turn it back on and confirm it is active again.
  5. A Boost that is not installed still shows "Get Boost", linking to its checkout buy_url.

🤖 Generated with Claude Code

Match installed Boosts by their updater download id or plugin name
when the API plugin path does not match the installed folder, so the
Add-Ons page shows their toggle and activates the right file.

Map the folder-style Boost slugs the API now sends to the existing
default descriptions and icons. The short slugs still work for older
cached feeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 66b777d and cca1b4b.

Files selected for processing: 3

  • classes/controllers/FrmAddonsController.php
  • classes/helpers/FrmAddonsHelper.php
  • tests/phpunit/misc/test_FrmBoostsMarketplace.php
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@deepsource-io

deepsource-io Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 66b777d...9d73a83 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Nov 17, 2026 5:58p.m. Review ↗
JavaScript Nov 17, 2026 5:58p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@deepsource-io

deepsource-io Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 66b777d...cca1b4b on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Nov 17, 2026 6:02p.m. Review ↗
JavaScript Nov 17, 2026 6:02p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

The API now sends folder-style Boost slugs, and the short slugs never
shipped in a release. Key the default Boost descriptions and icons on
the current slugs only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@franky-the-going-merry franky-the-going-merry Bot added the franky-working Franky is actively reviewing this label Nov 17, 2026

@franky-the-going-merry franky-the-going-merry Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. Both fixes do what the description says, and I found nothing blocking.

  • Installed Boosts now match by download_id (active) or plugin name (inactive) when the API path misses, and the matched file is also what the Activate/Deactivate buttons get ($addon['plugin']).
  • The icon and excerpt maps now use the formidable-* slugs. I grepped classes, tests and js/src for the old short slugs and found no remaining uses.

Tests run: phpunit --filter test_FrmBoostsMarketplace at cca1b4b → OK (8 tests, 49 assertions), in the wordpress-develop harness (PHP 8.4). CI skips the PHPUnit jobs on this PR, so this was a local run. The new test errors against master's controller (no get_boost_plugin_file), and fails when the download_id match is removed.

Live before/after: I ran prepare_addons() on a three-Boost feed in the same harness, with Advanced Modals installed inactive as frm-advanced-modals.php. On master it came back installed=false, status=not-installed, so it shows Get Boost, and all three icons fall back to the Formidable logo. On this PR it comes back installed=true, status=installed with an activate URL, plugin formidable-advanced-modals/frm-advanced-modals.php, and the popups, celebrations and bulk-edit icons. A Boost that is not installed (Bulk Edit) stays not-installed with the API path.

Not run: the Add-Ons page in a browser (no screenshot of the toggle), the active-Boost download_id path against a real FrmAddon registration (covered by the unit test only), code-review / security-review skills (I read the whole 118-line diff instead), PHPCS. DeepSource PHP is red. It posted no inline comments, and its summary says the issues it found are outside this diff; I did not open the dashboard.

@franky-the-going-merry franky-the-going-merry Bot removed franky-review franky-working Franky is actively reviewing this labels Nov 17, 2026
@Crabcyborg
Crabcyborg merged commit 310cf1d into master Nov 17, 2026
34 of 35 checks passed
@Crabcyborg
Crabcyborg deleted the fix/boost-addon-toggles branch November 17, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant