PHP 8.2.31
Preview: Autoloader.php Size: 2.01 KB
/home/nshryvcy/taramarriagebureau.com/wp-content/plugins/woocommerce/src/Autoloader.php

<?php
/**
 * Includes the composer Autoloader used for packages and classes in the src/ directory.
 */

namespace Automattic\WooCommerce;

defined( 'ABSPATH' ) || exit;

/**
 * Autoloader class.
 *
 * @since 3.7.0
 */
class Autoloader {

	/**
	 * Static-only class.
	 */
	private function __construct() {}

	/**
	 * Require the autoloader and return the result.
	 *
	 * If the autoloader is not present, let's log the failure and display a nice admin notice.
	 *
	 * @return boolean
	 */
	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;
	}

	/**
	 * If the autoloader is missing, add an admin notice.
	 */
	protected static function missing_autoloader() {
		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
			// This message is not translated as at this point it's too early to load translations.
			error_log(  // phpcs:ignore
				esc_html( 'Your installation of WooCommerce is incomplete. If you installed WooCommerce from GitHub, please refer to this document to set up your development environment: https://github.com/woocommerce/woocommerce/wiki/How-to-set-up-WooCommerce-development-environment' )
			);
		}
		add_action(
			'admin_notices',
			function() {
				?>
				<div class="notice notice-error">
					<p>
						<?php
						printf(
							/* translators: 1: is a link to a support document. 2: closing link */
							esc_html__( 'Your installation of WooCommerce is incomplete. If you installed WooCommerce from GitHub, %1$splease refer to this document%2$s to set up your development environment.', 'woocommerce' ),
							'<a href="' . esc_url( 'https://github.com/woocommerce/woocommerce/wiki/How-to-set-up-WooCommerce-development-environment' ) . '" target="_blank" rel="noopener noreferrer">',
							'</a>'
						);
						?>
					</p>
				</div>
				<?php
			}
		);
	}
}

Directory Contents

Dirs: 12 × Files: 4

Name Size Perms Modified Actions
Admin DIR
- drwxr-xr-x 2026-03-03 06:25:15
Edit Download
Blocks DIR
- drwxr-xr-x 2026-03-03 06:25:16
Edit Download
Caches DIR
- drwxr-xr-x 2026-03-03 06:25:16
Edit Download
Caching DIR
- drwxr-xr-x 2026-03-03 06:25:16
Edit Download
Checkout DIR
- drwxr-xr-x 2026-03-03 06:25:11
Edit Download
Database DIR
- drwxr-xr-x 2026-03-03 06:25:11
Edit Download
Enums DIR
- drwxr-xr-x 2026-03-03 06:25:16
Edit Download
Internal DIR
- drwxr-xr-x 2026-03-03 06:25:16
Edit Download
- drwxr-xr-x 2026-03-03 06:25:16
Edit Download
Proxies DIR
- drwxr-xr-x 2026-03-03 06:25:16
Edit Download
StoreApi DIR
- drwxr-xr-x 2026-03-03 06:25:16
Edit Download
Utilities DIR
- drwxr-xr-x 2026-03-03 06:25:16
Edit Download
2.01 KB lrw-r--r-- 2026-03-03 06:25:15
Edit Download
8.77 KB lrw-r--r-- 2026-03-03 06:25:16
Edit Download
588 B lrw-r--r-- 2026-03-03 06:25:16
Edit Download
12.38 KB lrw-r--r-- 2026-03-03 06:25:16
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).