PHP 8.2.31
Preview: Package.php Size: 1.64 KB
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/woocommerce/src/Internal/EmailEditor/Package.php

<?php

declare( strict_types=1 );

namespace Automattic\WooCommerce\Internal\EmailEditor;

defined( 'ABSPATH' ) || exit;

/**
 * This class is used to initialize the email editor package.
 *
 * It is a wrapper around the Automattic\WooCommerce\EmailEditor\Package class and
 * ensures that the email editor package is only initialized if the block editor feature flag is enabled.
 */
class Package {
	/**
	 * Version.
	 *
	 * @var string
	 */
	const VERSION = \Automattic\WooCommerce\EmailEditor\Package::VERSION;

	/**
	 * Package active.
	 *
	 * @var bool
	 */
	private static $package_active = false;

	/**
	 * Init the package.
	 *
	 * @internal
	 */
	final public static function init() {
		self::$package_active = get_option( 'woocommerce_feature_block_email_editor_enabled', 'no' ) === 'yes'; // init is called pretty early. Cant use FeaturesUtil.

		// we only want to initialize the package if the block editor feature flag is enabled.
		if ( ! self::$package_active ) {
			return;
		}

		self::initialize();
		\Automattic\WooCommerce\EmailEditor\Package::init();
	}

	/**
	 * Return the version of the package.
	 *
	 * @return string
	 */
	public static function get_version() {
		return \Automattic\WooCommerce\EmailEditor\Package::get_version();
	}

	/**
	 * Return the path to the package.
	 *
	 * @return string
	 */
	public static function get_path() {
		return \Automattic\WooCommerce\EmailEditor\Package::get_path();
	}

	/**
	 * Initialize the email editor integration by fetching the class from the container.
	 *
	 * @return void
	 */
	public static function initialize() {
		$container = wc_get_container();
		$container->get( Integration::class );
	}
}

Directory Contents

Dirs: 4 × Files: 9

Name Size Perms Modified Actions
- drwxr-xr-x 2026-05-29 02:43:21
Edit Download
- drwxr-xr-x 2026-05-29 02:43:21
Edit Download
- drwxr-xr-x 2026-05-29 02:43:21
Edit Download
- drwxr-xr-x 2026-05-29 02:43:21
Edit Download
5.39 KB lrw-r--r-- 2025-11-24 23:10:10
Edit Download
17.08 KB lrw-r--r-- 2026-05-05 14:26:50
Edit Download
17.03 KB lrw-r--r-- 2026-05-05 14:26:50
Edit Download
4.10 KB lrw-r--r-- 2025-09-01 23:44:48
Edit Download
1.64 KB lrw-r--r-- 2025-05-12 21:07:28
Edit Download
4.62 KB lrw-r--r-- 2025-09-01 23:44:48
Edit Download
2.20 KB lrw-r--r-- 2025-05-12 21:07:28
Edit Download
3.38 KB lrw-r--r-- 2026-02-23 17:58:34
Edit Download
4.77 KB lrw-r--r-- 2026-05-05 14:26:50
Edit Download

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