• Resolved mctenold

    (@mctenold)


    Is it possible to check whether or not Jetpack has been “connected” in code?

    I’m building a plugin and my plugin relies on Jetpack.

    I know how to check that the plugin is installed and active. But I need to know if Jetpack has been “connected”, in code.

    Any way of doing this?

    https://ww.wp.xz.cn/plugins/jetpack/

Viewing 1 replies (of 1 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    You can use Jetpack::is_active() to find out if Jetpack is currently connected.

    I would also recommend checking if the Jetpack class exists before that, and if you rely on a specific module, making sure it’s active with Jetpack::is_module_active( 'module-name' ).

    I hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘Checking whether or not Jetpack has been "connected" in code?’ is closed to new replies.