Insert Whatsapp number in widget AD
We have a customized whatsapp field. When the user enters a new ad he fills in that number. If I write the code
<a href="<?php echo "https://api.whatsapp.com/send?phone=55".get_post_meta( $post-> ID, 'cp_whatsapp', true). "& Text = I am interested in the product ".get_permalink ($ post-> ID)." Can we talk? ";?>" Target = "_ blank"> <img src = "..."> </a>
right in the code, it brings the number, but if I put it in a widget it doesn't work. What can it be? Look at the whatsapp button on the sidebar working with direct code, but not working on the widget.