Automattic\WooCommerce\Internal\ComingSoon

ComingSoonRequestHandler::enqueue_styles()publicWC 1.0

Enqueues the coming soon banner styles.

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

Хуков нет.

Возвращает

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

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

$ComingSoonRequestHandler = new ComingSoonRequestHandler();
$ComingSoonRequestHandler->enqueue_styles();

Код ComingSoonRequestHandler::enqueue_styles() WC 9.7.1

public function enqueue_styles() {
	// Early exit if the user is not logged in as administrator / shop manager.
	if ( ! current_user_can( 'manage_woocommerce' ) ) {
		return;
	}

	// Early exit if LYS feature is disabled.
	if ( ! Features::is_enabled( 'launch-your-store' ) ) {
		return;
	}

	if ( $this->coming_soon_helper->is_site_live() ) {
		return;
	}

	wp_enqueue_style(
		'woocommerce-coming-soon',
		WC()->plugin_url() . '/assets/css/coming-soon' . ( is_rtl() ? '-rtl' : '' ) . '.css',
		array(),
		Constants::get_constant( 'WC_VERSION' )
	);
}