WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Internal\DependencyManagement

ExtendedContainer::is_class_allowed() protected WC 1.0

Checks to see whether or not a class is allowed to be registered.

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

No Hooks.

Return

true|false. True if the class is allowed to be registered, false otherwise.

Usage

// protected - for code of main (parent) or child class
$result = $this->is_class_allowed( $class_name ): bool;
$class_name(string) (required)
The class to check.

Code of ExtendedContainer::is_class_allowed() WC 5.9.0

protected function is_class_allowed( string $class_name ): bool {
	return StringUtil::starts_with( $class_name, $this->woocommerce_namespace, false ) || in_array( $class_name, $this->registration_whitelist, true );
}