Message at the top of WooCommerce checkout page for NON logged in users with specific product category

The scenario is:
The customer is not registered, he chooses a product from category (aaa) to buy.
Now I want a message to be displayed to him at the top of the checkout page.
For the following code, only the condition of NON LOGGED in is included, how can I add a category to it.
Thankful

/** Message at the top of WooCommerce checkout page for NON LOGGED in users  */
 
add_action( 'woocommerce_before_checkout_form', 'wnd_checkout_code', 2 );

function wnd_checkout_code( ) {
    if ( is_page('checkout') && ! is_user_logged_in() ) {
        echo '<div class="woocommerce-info">';
        echo 'New Customer? Please add your details';
        echo '</div>';
    }
}