Automattic\WooCommerce\Internal\Admin

Loader::smart_app_bannerpublic staticWC 1.0

Adds an iOS "Smart App Banner" for display on iOS Safari. See https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html

Метод класса: Loader{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$result = Loader::smart_app_banner();

Код Loader::smart_app_banner() WC 11.0.0

public static function smart_app_banner() {
	$exclude_paths = array(
		'/customize-store',
		'/setup-wizard',
		'/launch-your-store',
	);

	/* phpcs:ignore */
	$path = $_GET['path'] ?? '';

	if ( PageController::is_admin_or_embed_page() && ! in_array( $path, $exclude_paths, true ) ) {
		echo "
			<meta name='apple-itunes-app' content='app-id=1389130815'>
		";
	}
}