Automattic\WooCommerce\Admin\Marketing

InstalledExtensions::get_creative_mail_extension_data()protected staticWC 1.0

Get Creative Mail for WooCommerce extension data.

{} Это метод класса: InstalledExtensions{}

Хуков нет.

Возвращает

Массив|true|false.

Использование

$result = InstalledExtensions::get_creative_mail_extension_data();

Код InstalledExtensions::get_creative_mail_extension_data() WC 7.1.0

protected static function get_creative_mail_extension_data() {
	$slug = 'creative-mail-by-constant-contact';

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

	$data         = self::get_extension_base_data( $slug );
	$data['icon'] = WC_ADMIN_IMAGES_FOLDER_URL . '/marketing/creative-mail-by-constant-contact.png';

	if ( 'activated' === $data['status'] && class_exists( '\CreativeMail\Helpers\OptionsHelper' ) ) {
		if ( ! method_exists( '\CreativeMail\Helpers\OptionsHelper', 'get_instance_id' ) || \CreativeMail\Helpers\OptionsHelper::get_instance_id() !== null ) {
			$data['status']      = 'configured';
			$data['settingsUrl'] = admin_url( 'admin.php?page=creativemail_settings' );
		} else {
			$data['settingsUrl'] = admin_url( 'admin.php?page=creativemail' );
		}

		$data['docsUrl']    = 'https://app.creativemail.com/kb/help/WooCommerce';
		$data['supportUrl'] = 'https://app.creativemail.com/kb/help/';
	}

	return $data;
}