Adding more product from contact form 7 to woocommerce checkout

吃可爱长大的小学妹 提交于 2021-02-19 07:32:45

问题


I am creating an order form that sells sim and i have a dropdown menu that list option to top up i want once a customer select an option it add to cart and then link a button to the checkout page


回答1:


on_sent_ok is deprecated in latest version of contact form 7, but alternate way is:

document.addEventListener( 'wpcf7mailsent', function( event ) {
location = 'http://www.yoursite.com/checkout/?add-to-cart=ID';}, false );


来源:https://stackoverflow.com/questions/53063904/adding-more-product-from-contact-form-7-to-woocommerce-checkout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!