Automattic\WooCommerce\Internal\Admin

Loader::embed_page_header()public staticWC 1.0

Set up a div for the header embed to render into. The initial contents here are meant as a place loader for when the PHP page initialy loads.

Method of the class: Loader{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = Loader::embed_page_header();

Loader::embed_page_header() code WC 8.7.0

<?php
public static function embed_page_header() {
	if ( ! PageController::is_admin_page() && ! PageController::is_embed_page() ) {
		return;
	}

	if ( ! PageController::is_embed_page() ) {
		return;
	}

	$sections = self::get_embed_breadcrumbs();
	$sections = is_array( $sections ) ? $sections : array( $sections );
	?>
	<div id="woocommerce-embedded-root" class="is-embed-loading">
		<div class="woocommerce-layout">
			<div class="woocommerce-layout__header is-embed-loading">
				<h1 class="woocommerce-layout__header-heading">
					<?php self::output_heading( end( $sections ) ); ?>
				</h1>
			</div>
		</div>
	</div>
	<?php
}