WordPress at Your Fingertips
function is not described

WC_Admin::conditional_includes() public WC 1.0

Include admin files conditionally.

{} It's a method of the class: WC_Admin{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Admin = new WC_Admin();
$WC_Admin->conditional_includes();

Code of WC_Admin::conditional_includes() WC 5.9.0

public function conditional_includes() {
	$screen = get_current_screen();

	if ( ! $screen ) {
		return;
	}

	switch ( $screen->id ) {
		case 'dashboard':
		case 'dashboard-network':
			include __DIR__ . '/class-wc-admin-dashboard-setup.php';
			include __DIR__ . '/class-wc-admin-dashboard.php';
			break;
		case 'options-permalink':
			include __DIR__ . '/class-wc-admin-permalink-settings.php';
			break;
		case 'plugins':
			include __DIR__ . '/plugin-updates/class-wc-plugins-screen-updates.php';
			break;
		case 'update-core':
			include __DIR__ . '/plugin-updates/class-wc-updates-screen-updates.php';
			break;
		case 'users':
		case 'user':
		case 'profile':
		case 'user-edit':
			include __DIR__ . '/class-wc-admin-profile.php';
			break;
	}
}