Skip to content

Instantly share code, notes, and snippets.

@dlucero23
Created June 6, 2016 22:42
Show Gist options
  • Save dlucero23/b87a97210f2b094d74eccd987f13d852 to your computer and use it in GitHub Desktop.
Save dlucero23/b87a97210f2b094d74eccd987f13d852 to your computer and use it in GitHub Desktop.
If you want to add a product to the cart after gathering information via the form and then redirect to the WooCommerce checkout, add the following to the Contact Form 7 Additional Settings field. You can learn more about this technique via this link: http://www.kimwoodbridge.com/use-the-contact-form-7-plugin-to-add-a-product-to-the-woocommerce-c…
on_sent_ok: "location.replace('http://www.YOURSITE.com/checkout/?add-to-cart=ID');"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment