WC_Admin_Dashboard::__construct()publicWC 1.0

Hook in tabs.

Method of the class: WC_Admin_Dashboard{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Admin_Dashboard = new WC_Admin_Dashboard();
$WC_Admin_Dashboard->__construct();

WC_Admin_Dashboard::__construct() code WC 8.7.0

public function __construct() {
	// Only hook in admin parts if the user has admin access.
	if ( $this->should_display_widget() ) {
		// If on network admin, only load the widget that works in that context and skip the rest.
		if ( is_multisite() && is_network_admin() ) {
			add_action( 'wp_network_dashboard_setup', array( $this, 'register_network_order_widget' ) );
		} else {
			add_action( 'wp_dashboard_setup', array( $this, 'init' ) );
		}
	}
}