Automattic\WooCommerce\Internal\DependencyManagement
RuntimeContainer::is_class_allowed
Checks to see whether a class is allowed to be registered.
Method of the class: RuntimeContainer{}
No Hooks.
Returns
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.
RuntimeContainer::is_class_allowed() RuntimeContainer::is class allowed code WC 11.0.0
protected function is_class_allowed( string $class_name ): bool {
return StringUtil::starts_with( $class_name, self::WOOCOMMERCE_NAMESPACE, false );
}