Skip to content
Corex

UpdateService

Corex\Update\UpdateService · class · Core layer

Wires Corex into WordPress’s plugin-update flow so a published newer version surfaces as an available update in wp-admin — like any plugin. It fetches an update manifest from the configured endpoint, asks the pure UpdateChecker if it is newer, and injects the update into the update transient (and the details popup). Fail-safe: a missing/unreachable/ malformed source is a silent no-op. WordPress’s own updater downloads + installs the package, replacing only the framework plugin’s files (spec 034).

__construct(UpdateChecker $checker, string $pluginFile, string $slug, string $currentVersion, ConfigInterface $config)

Section titled “__construct(UpdateChecker $checker, string $pluginFile, string $slug, string $currentVersion, ConfigInterface $config)”

The WP plugin-update object for an available update (the shape WP expects in the transient’s response).

Fetch the update manifest from the configured endpoint. Fail-safe: empty endpoint, a transport error, or malformed JSON all yield an empty manifest (→ no update offered).