jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Status > Modules: update module checks to be aware of WordPress.com Simple

Open jeherve opened this issue 3 years ago • 1 comments

The Status package includes a Modules class that can be very handy to check whether a specific Jetpack module is active: https://github.com/Automattic/jetpack/blob/c100a09efb6c4c59029fc3e16ac0560bd1cf978c/projects/packages/status/src/class-modules.php#L21-L27

Unfortunately, those tools are not compatible with WordPress.com, where modules are always active and where you do not need to check for Jetpack options (nor should you, that won't work).

Today, we work around that problem by adding a condition along with the module check, like in #34229. Ideally, that condition should be baked in the Module class.

jeherve avatar Nov 21 '23 17:11 jeherve

@jeherve if #34248 addresses this, I can abandon #34229 in favor of the more generic solution.

pgk avatar Nov 22 '23 14:11 pgk