Automattic\WooCommerce

Autoloader::init()public staticWC 1.0

Require the autoloader and return the result.

If the autoloader is not present, let's log the failure and display a nice admin notice.

Method of the class: Autoloader{}

No Hooks.

Return

true|false.

Usage

$result = Autoloader::init();

Autoloader::init() code WC 8.7.0

public static function init() {
	$autoloader = dirname( __DIR__ ) . '/vendor/autoload_packages.php';

	if ( ! is_readable( $autoloader ) ) {
		self::missing_autoloader();
		return false;
	}

	$autoloader_result = require $autoloader;
	if ( ! $autoloader_result ) {
		return false;
	}

	return $autoloader_result;
}