Automattic\WooCommerce\Internal\Admin\Logging

PageController::noticespublicWC 1.0

Notices to display on Logs screens.

Method of the class: PageController{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

PageController::notices() code WC 10.3.3

<?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
			}
		);
	}
}