title: Customizing add-to-cart messages based on the product IDs in WooCommerce 3
body: <p>I have two products in my website and want to display different messages (In message I want to use HTML) on adding different products to cart. Right now it displays <code>Product successfully added to cart.</code>
  I am using this code in my child's function.php which is working but is not giving me what I exactly want.</p>
  
  <pre><code>add_filter ( 'wc_add_to_cart_message', 'wc_add_to_cart_message_filter', 10, 2 );
  function wc_add_to_cart_message_filter($message, $product_id = null) {
     $titles[] = get_the_title( $product_id );
  
  $titles = array_filter( $titles );
  $added_text = sprintf( _n( '%s has been successfully added to your Basket.', '%s have been added to your Basket.', sizeof( $titles ), 'woocommerce' ), wc_format_list_of_items( $titles ) );
  
  $message = sprintf( '%s &lt;a href="%s" class="button"&gt;%s&lt;/a&gt;',
                 esc_html( $added_text ),
                 esc_url( wc_get_page_permalink( 'cart' ) ),
                 esc_html__( 'View Cart', 'woocommerce' ));
  
  return $message;
  }
  </code></pre>