title: How to add script tag codings in woocommerce add_action?
body: <pre><code>add_action( 'woocommerce_single_product_summary', 'whatsappdirect1', 35 );
  
  function whatsappdirect1() {
      echo '[anchor-tag a class="btn btn-social-icon btn-whatsapp" href="javascript:window.location=waCurrentPage();"&gt;[img tag border="0" alt="W3Schools" src="http://sareechoice.com/wp-content/uploads/2017/07/whatsappicon.png" width="290" height="200"][anchor-tag-closed]';
  }
  
  [script]
  waCurrentPage = function() {
    return encodeURI("whatsapp://send?phone=+9199999999&amp;text=please let me know the price of the product in the link : " + 'http://' + window.location.hostname + window.location.pathname);
  }
  [/script]
  </code></pre>
  
  <p>I have made the following code, that allows mobile users to contact my support team on my website on my whatsapp, along with the link of the page. In the above <code>add_action</code> code I have put the codes, that will display my button, which has to be clicked on the woocommerce product page.</p>
  
  <p>But now the problem is, that the script codes which does actual work of opening my whatsapp number with predefault link that allow users to send it to my number.</p>
  
  <p>So how to insert that script code and also where to insert that? Is there any way, where I can keep both codes at one <code>add_action</code> function of woocommerce?</p>