Automattic\WooCommerce\Internal\Admin\Logging

PageController::notices()publicWC 1.0

Notices to display on Logs screens.

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

Хуков нет.

Возвращает

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

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

$PageController = new PageController();
$PageController->notices();

Код PageController::notices() WC 9.7.1

<?php
public function notices() {
	if ( ! $this->settings->logging_is_enabled() ) {
		add_action(
			'admin_notices',
			function () {
				?>
				<div class="notice notice-warning">
					<p>
						<?php
						printf(
							// translators: %s is a URL to another admin screen.
							wp_kses_post( __( 'Logging is disabled. It can be enabled in <a href="%s">Logs Settings</a>.', 'woocommerce' ) ),
							esc_url( add_query_arg( 'view', 'settings', $this->get_logs_tab_url() ) )
						);
						?>
					</p>
				</div>
				<?php
			}
		);
	}
}