问题
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