Auto-enable WordPress plugin auto-updates for 42flows plugins. On every successful /install-companion call, both 42flows-seo-meta and 42flows-content are added to WordPress’s auto_update_plugins site option so future feature/security/fix releases reach the customer site without a manual click. Idempotent — safe to call repeatedly. Customers retain control: the WP admin Plugins page still shows a “Disable auto-updates” link.
Why: customers connect their site to 42flows specifically so 42flows manages the meta + render layer; asking them to also manually toggle plugin auto-updates per plugin is onboarding friction with no upside (every WP-side plugin update of these two plugins comes from us anyway).
1.2.0
Add optional min_version parameter to /wp-json/42flows/v1/install-companion. When supplied (semver X.Y.Z), the route compares the installed companion version against min_version and performs an in-place upgrade (deactivate → delete → reinstall → activate) if the installed version is older. Required because WordPress’s Plugin_Upgrader::install refuses to overwrite an existing plugin folder. Without this parameter, behavior is unchanged: idempotent ensure-installed-and-active.
Upgrade path additionally requires the authenticated user to hold the delete_plugins capability, in line with the principle of least privilege.
min_version is validated as ^d+.d+.d+$ before reaching version_compare() to reject arbitrary input.
Code refactored: install logic deduplicated into a shared helper used by both fresh-install and upgrade paths.
1.1.0
Add REST route /wp-json/42flows/v1/install-companion for authenticated companion-plugin installation (requires install_plugins capability). Used only when the site is connected to 42flows.
1.0.0
Initial release.
Support for Yoast SEO, Rank Math, and All in One SEO.