=' ); } public static function register_admin_notice(): void { if ( is_admin() ) { add_action( 'admin_notices', array( self::class, 'render_admin_notice' ) ); } } public static function render_admin_notice(): void { if ( ! current_user_can( 'activate_plugins' ) ) { return; } if ( ! class_exists( 'WooCommerce' ) ) { $message = __( 'Leanmerce Commerce Assistant requires WooCommerce to be installed and active.', 'leanmerce-commerce-assistant' ); } else { $message = sprintf( /* translators: %s: minimum supported WooCommerce version. */ __( 'Leanmerce Commerce Assistant requires WooCommerce %s or newer.', 'leanmerce-commerce-assistant' ), self::MINIMUM_WOOCOMMERCE_VERSION ); } echo '

' . esc_html( $message ) . '

'; } private function __construct() {} }