Automattic\WooCommerce\Admin\Marketing

InstalledExtensions::get_klaviyo_extension_data()protected staticWC 1.0

Get Klaviyo extension data.

Method of the class: InstalledExtensions{}

No Hooks.

Return

Array|true|false.

Usage

$result = InstalledExtensions::get_klaviyo_extension_data();

InstalledExtensions::get_klaviyo_extension_data() code WC 9.0.1

protected static function get_klaviyo_extension_data() {
	$slug = 'klaviyo';

	if ( ! PluginsHelper::is_plugin_installed( $slug ) ) {
		return false;
	}

	$data         = self::get_extension_base_data( $slug );
	$data['icon'] = plugins_url( 'assets/images/marketing/klaviyo.png', WC_PLUGIN_FILE );

	if ( 'activated' === $data['status'] ) {
		$klaviyo_options = get_option( 'klaviyo_settings' );
		if ( isset( $klaviyo_options['klaviyo_public_api_key'] ) ) {
			$data['status'] = 'configured';
		}

		$data['settingsUrl'] = admin_url( 'admin.php?page=klaviyo_settings' );
	}

	return $data;
}