
// <script>
// jQuery(document).ready(function($){

//     $('.single_add_to_cart_button').hide();

//     $('.single_add_to_cart_button').after('<button id="wa_order" class="button alt" style="margin-top:10px;">Send to WhatsApp</button>');

//     $('#wa_order').click(function(e){
//         e.preventDefault();

//         var product = $('.product_title').text().trim();
//         var qty = $('input.qty').val();

//         var message = "Hello!%0A%0A";
//         message += "I would like to place an order:%0A";

//         message += "Product: " + product + "%0A";
//         message += "Quantity: " + qty + "%0A";

//         // Variations
//         $('table.variations select').each(function(){
//             var label = $(this).closest('tr').find('label').text().trim();
//             var value = $(this).find('option:selected').text().trim();

//             if(value && value.indexOf('Choose') === -1){
//                 message += label + ": " + value + "%0A";
//             }
//         });

//         // === 修正后的日期抓取逻辑 ===
//         $('input').each(function(){
//             var name = $(this).attr('name');

//             if(name && name.toLowerCase().indexOf('date') !== -1){
//                 var dateVal = $(this).val();
//                 if(dateVal){
//                     message += "Date: " + dateVal + "%0A";
//                 }
//             }
//         });

//         // Remark
//         $('textarea[name="product_remark"]').each(function(){
//             var remark = $(this).val().trim();
//             if(remark){
//                 message += "Remark: " + remark + "%0A";
//             }
//         });

//         message += "%0AThank you!";

//         var phone = "601133800680"; // 改成你的号码

//         var url = "https://wa.me/" + phone + "?text=" + message;

//         window.open(url, '_blank');
//     });

// });
// </script>

//     {"version":"1.0","provider_name":"\u84b8\u81b3\u7cae","provider_url":"https:\/\/zennovifood.com\/en","title":"\u84b8\u81b3\u7cae - \u5efa\u8170\u7cbe+\u94c1","type":"rich","width":600,"height":338,"html":"<blockquote class=\"wp-embedded-content\" data-secret=\"DiU02IPcNY\"><a href=\"https:\/\/zennovifood.com\/en\/product\/%e5%bb%ba%e8%85%b0%e7%b2%be%e9%93%81\/\">\u5efa\u8170\u7cbe+\u94c1<\/a><\/blockquote><iframe sandbox=\"allow-scripts\" security=\"restricted\" src=\"https:\/\/zennovifood.com\/en\/product\/%e5%bb%ba%e8%85%b0%e7%b2%be%e9%93%81\/embed\/#?secret=DiU02IPcNY\" width=\"600\" height=\"338\" title=\"&#8220;\u5efa\u8170\u7cbe+\u94c1&#8221; &#8212; \u84b8\u81b3\u7cae\" data-secret=\"DiU02IPcNY\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" class=\"wp-embedded-content\"><\/iframe><script type=\"text\/javascript\">\n\/* <![CDATA[ *\/\n\/*! This file is auto-generated *\/\n!function(d,l){\"use strict\";l.querySelector&&d.addEventListener&&\"undefined\"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!\/[^a-zA-Z0-9]\/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret=\"'+t.secret+'\"]'),o=l.querySelectorAll('blockquote[data-secret=\"'+t.secret+'\"]'),c=new RegExp(\"^https?:$\",\"i\"),i=0;i<o.length;i++)o[i].style.display=\"none\";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute(\"style\"),\"height\"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):\"link\"===t.message&&(r=new URL(s.getAttribute(\"src\")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(d.top.location.href=t.value))}},d.addEventListener(\"message\",d.wp.receiveEmbedMessage,!1),l.addEventListener(\"DOMContentLoaded\",function(){for(var e,t,s=l.querySelectorAll(\"iframe.wp-embedded-content\"),r=0;r<s.length;r++)(t=(e=s[r]).getAttribute(\"data-secret\"))||(t=Math.random().toString(36).substring(2,12),e.src+=\"#?secret=\"+t,e.setAttribute(\"data-secret\",t)),e.contentWindow.postMessage({message:\"ready\",secret:t},\"*\")},!1)))}(window,document);\n\/* ]]> *\/\n<\/script>","thumbnail_url":"https:\/\/zennovifood.com\/wp-content\/uploads\/2025\/05\/\u5efa\u8170\u7f51\u7edc\u7528.jpg","thumbnail_width":375,"thumbnail_height":375,"description":"Please provide product id to display corresponding data! Please provide product id to display corresponding data! \u53ef\u80fd\u4f60\u4e5f\u559c\u6b22 Please provide product id to"}