Automattic\WooCommerce\Admin\Marketing

InstalledExtensions::get_vimeo_extension_data()protected staticWC 1.0

Get Vimeo extension data.

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

Хуков нет.

Возвращает

Массив|true|false.

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

$result = InstalledExtensions::get_vimeo_extension_data();

Код InstalledExtensions::get_vimeo_extension_data() WC 7.1.0

protected static function get_vimeo_extension_data() {
	$slug = 'vimeo';

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

	$data         = self::get_extension_base_data( $slug );
	$data['icon'] = WC_ADMIN_IMAGES_FOLDER_URL . '/marketing/vimeo.png';

	if ( 'activated' === $data['status'] && class_exists( '\Tribe\Vimeo_WP\Vimeo\Vimeo_Auth' ) ) {
		if ( method_exists( '\Tribe\Vimeo_WP\Vimeo\Vimeo_Auth', 'has_access_token' ) ) {
			$vimeo_auth = new \Tribe\Vimeo_WP\Vimeo\Vimeo_Auth();
			if ( $vimeo_auth->has_access_token() ) {
				$data['status'] = 'configured';
			}
		} else {
			$data['status'] = 'configured';
		}

		$data['settingsUrl'] = admin_url( 'options-general.php?page=vimeo_settings' );
		$data['docsUrl']     = 'https://woocommerce.com/document/vimeo/';
		$data['supportUrl']  = 'https://vimeo.com/help/contact';
	}

	return $data;
}