WC_Admin_Assets::render_lost_connection_noticepublicWC 1.0

Render a #wc-lost-connection-notice mirroring WP core's own notice on post edit screens. See should_show_lost_connection_notice() for which screens get it.

Method of the class: WC_Admin_Assets{}

No Hooks.

Returns

null. Nothing (null).

Usage

$WC_Admin_Assets = new WC_Admin_Assets();
$WC_Admin_Assets->render_lost_connection_notice();

WC_Admin_Assets::render_lost_connection_notice() code WC 11.0.0

<?php
public function render_lost_connection_notice() {
	if ( ! $this->should_show_lost_connection_notice() ) {
		return;
	}
	?>
	<div id="wc-lost-connection-notice" class="notice error hidden">
		<p>
			<span class="spinner"></span>
			<strong><?php esc_html_e( 'Connection lost.' ); /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- Reusing WP core translation. */ ?></strong>
			<?php esc_html_e( 'Saving has been disabled until you are reconnected.' ); /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- Reusing WP core translation. */ ?>
		</p>
	</div>
	<?php
}