get whatsapp field data from sellers registration for link on product page
-
Hello, I hope you are very well.
I need a little help on this matter, I want to make the whatsaap link that I have on the simple product page works with the number of the supplier that published the product. I already saw that the same code has it on another website but maybe I use a custom field with acf, I don’t want that but what I want is to obtain the number of billing_whatsapp (which is a field that I created just like the woocommerce billing_phone exists ) or better yet obtain the whatsapp number from the field that I created specifically for the seller in the sellers registry.
Below I show you the links, the screenshots and the corresponding code so that you can verify this and if it is possible that they give me this precious help that I need and I can not solve:
the code I use:
https://decodecms.com/consultar-dudas-de-produtos-por-whatsapp-en-woocommerce/add_action (‘woocommerce_share’, ‘dcms_question_whatsapp’);
function dcms_question_whatsapp () {
$ phone = ‘34123456789’;
$ message = ‘I want product information:’ .get_the_title (). ‘ ‘;
$ text = ‘Ask for WhatsApp’;
$ ico = ‘‘;$ url = ‘https://api.whatsapp.com/send?phone=’.$phone.’&text=’.str_replace (‘ ‘,’% 20 ‘, $ message);
$ link = ‘‘. $ ico. ‘<span>’. $ text. ‘</span> ‘;echo ‘<div class = “dc-whatsapp-container”>’. $ link. ‘</div>’;
};the web that already has the same code implemented and uses wcfm: https://setevende.com/producto/tabla-playera-mickey-mouse/
my product page: https://www.avellanedashop.com/publicacion/tony-v-sneakers/
the registration of sellers with the whatsapp field:
https://www.avellanedashop.com/vender/If you need more information let me know, thank you very much in advance!
The page I need help with: [log in to see the link]
- The topic ‘get whatsapp field data from sellers registration for link on product page’ is closed to new replies.