WordPress at a glance
function is not described


PHP_Autoloader::register_autoloader() public WC 1.0

Registers the autoloader with PHP so that it can begin autoloading classes.

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

No Hooks.


null. Nothing.


$PHP_Autoloader = new PHP_Autoloader();
$PHP_Autoloader->register_autoloader( $version_loader );
$version_loader(Version_Loader) (required)
The class loader to use in the autoloader.

Code of PHP_Autoloader::register_autoloader() WC 5.2.2

public function register_autoloader( $version_loader ) {
	// Make sure no other autoloaders are registered.

	// Set the global so that it can be used to load classes.
	global $jetpack_autoloader_loader;
	$jetpack_autoloader_loader = $version_loader;

	// Ensure that the autoloader is first to avoid contention with others.
	spl_autoload_register( array( self::class, 'load_class' ), true, true );