Automattic\WooCommerce\Internal\Admin\Logging

PageController::maybe_do_logs_tab_actionpublicWC 1.0

Determine if the current tab on the Status page is Logs, and if so, fire an action.

Method of the class: PageController{}

Hooks from the method

Returns

null. Nothing (null).

Usage

$PageController = new PageController();
$PageController->maybe_do_logs_tab_action(): void;

PageController::maybe_do_logs_tab_action() code WC 10.7.0

public function maybe_do_logs_tab_action(): void {
	$is_logs_tab = 'logs' === filter_input( INPUT_GET, 'tab' );

	if ( $is_logs_tab ) {
		$params = $this->get_query_params( array( 'view' ) );

		/**
		 * Action fires when the Logs tab starts loading.
		 *
		 * @param string $view The current view within the Logs tab.
		 *
		 * @since 8.6.0
		 */
		do_action( 'wc_logs_load_tab', $params['view'] );
	}
}