Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators

Controller::get_active_jetpack_modules()privateWC 1.0

Get active Jetpack modules.

Method of the class: Controller{}

No Hooks.

Return

Array. List of active Jetpack module slugs.

Usage

// private - for code of main (parent) class only
$result = $this->get_active_jetpack_modules();

Controller::get_active_jetpack_modules() code WC 7.3.0

private function get_active_jetpack_modules() {
	if ( is_null( $this->active_jetpack_modules ) ) {
		if ( class_exists( '\Jetpack' ) && method_exists( '\Jetpack', 'get_active_modules' ) ) {
			$active_modules               = \Jetpack::get_active_modules();
			$this->active_jetpack_modules = is_array( $active_modules ) ? $active_modules : array();
		} else {
			$this->active_jetpack_modules = array();
		}
	}

	return $this->active_jetpack_modules;
}