How To Add Order On WhatsApp Button On Product Page In Shopify

How To Add Order On WhatsApp Button On Product Page In Shopify

{% capture product_url %}{{ shop.url }}{{ product.url }}{% endcapture %}
{% capture product_name %}{{ product.title | url_escape }}{% endcapture %}
<a href="https://wa.me/+4400700000000?text=Hello, I%20would%20like%20to%20buy%20this%20product:%20{{ product_name }}%20{{ product_url }}" class="btn btn--buy-on-whatsapp" target="_blank">Order on WhatsApp</a>
.btn--buy-on-whatsapp {
  display: block;
  margin-top: 29px;
  padding: 11px 30px;
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  background-color: #25d366;
  border: 1px solid #4e4e4e;
  border-radius: 0px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
}
.btn--buy-on-whatsapp:hover {
  background-color: #fff;
  color: #4e4e4e;
  border-radius: 10px;
}