Automattic\WooCommerce\EmailEditor\Engine
Dependency_Check{}
This class is responsible checking the dependencies of the email editor.
Хуков нет.
Использование
$Dependency_Check = new Dependency_Check(); // use class methods
Методы
- public are_dependencies_met()
- private is_wp_version_compatible()
Код Dependency_Check{} Dependency Check{} WC 10.0.2
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, '>=' ); } }