Skip to content

v3.0 — WordPress Auto-Update Integration

Latest

Choose a tag to compare

@nadimtuhin nadimtuhin released this 27 Jun 19:09
· 5 commits to main since this release

What's new

Auto-update from WordPress admin

The plugin now plugs into WordPress's native update system — no more manual download-and-replace.

Minor/patch releases (3.0 → 3.1, 3.1 → 3.2…) apply automatically via WP's background updater — same as plugins from wordpress.org.

Major releases (3.x → 4.x) require a manual tap: an admin notice appears and the Plugins dashboard shows an "Update now" link.

How it works

  • Hooks pre_set_site_transient_update_plugins to inject the GitHub release into WP's update check
  • Hooks auto_update_plugin to allow minors, block majors
  • GitHub API response cached for 12 hours via WP transient — no repeated API calls
  • Fails silently if GitHub is unreachable

Tests

54 PHPUnit tests, all passing. PHPCS 0 errors.