WC_Admin_Addons::output_empty()public staticWC 1.0

Output HTML for a promotion action if data couldn't be fetched.

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

Хуков нет.

Возвращает

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

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

$result = WC_Admin_Addons::output_empty( $message );
$message(строка)
Error message.
По умолчанию: ''

Код WC_Admin_Addons::output_empty() WC 8.7.0

<?php
public static function output_empty( $message = '' ) {
	?>
	<div class="wc-addons__empty">
		<h2><?php echo wp_kses_post( __( 'Oh no! We\'re having trouble connecting to the extensions catalog right now.', 'woocommerce' ) ); ?></h2>
		<?php if ( ! empty( $message ) ) : ?>
			<p><?php echo esc_html( $message ); ?></p>
		<?php endif; ?>
		<p>
			<?php
			printf(
				wp_kses_post(
					/* translators: a url */
					__(
						'To start growing your business, head over to <a href="%s">Woo.com</a>, where you\'ll find the most popular WooCommerce extensions.',
						'woocommerce'
					)
				),
				'https://woo.com/products/?utm_source=extensionsscreen&utm_medium=product&utm_campaign=connectionerror'
			);
			?>
		</p>
	</div>
	<?php
}