MailPoet\EmailEditor\Engine

Dependency_Check{}WC 1.0

This class is responsible checking the dependencies of the email editor.

No Hooks.

Usage

$Dependency_Check = new Dependency_Check();
// use class methods

Methods

  1. public are_dependencies_met()
  2. private is_wp_version_compatible()

Dependency_Check{} code WC 9.8.1

class Dependency_Check {
	/**
	 * Minimum WordPress version required for the email editor.
	 */
	public const MIN_WP_VERSION = '6.7';

	/**
	 * Checks if all dependencies are met.
	 */
	public function are_dependencies_met(): bool {
		if ( ! $this->is_wp_version_compatible() ) {
			return false;
		}
		return true;
	}

	/**
	 * Checks if the WordPress version is supported.
	 */
	private function is_wp_version_compatible(): bool {
		return version_compare( get_bloginfo( 'version' ), self::MIN_WP_VERSION, '>=' );
	}
}