I was wondering how to redirect people after checking out? there is some code in the form already but it doesnt tell you where to put it? Can some one help? thank you
In general terms, you should first create a child theme. This is so your primary theme can be updated in future without overwriting any customisations. Next, you should create a file called functions.php in your child theme, and you use this file for your custom code. Any code in your child theme’s functions.php is executed before code in functions.php in the primary theme.
I have not seen your code. It might not be what I envisage. Perhaps you could post a link to what you have seen.
Thank you for your help
http://wordpress.org/support/topic/redirect-after-checkout-in-woocommerce?replies=15
This is the thread where they are talking about it…but I dont need a different redirect for every product.
Thank you
OK, create a child theme as above but you don’t need functions.php, not for this task anyway.
The thread you quote gives 2 methods for redirects, the first applies to every product and I think that’s the method you want. The second is on a per product basis and I don’t cover it here.
Look for this file:
wp-content/themes/YOUR_CHILD_THEME/woocommerce/checkout/thankyou.php
If it doesn’t exist, make the sub-directories if you need to, and copy the file from:
wp-content/plugins/woocommerce/templates/checkout/thankyou.php
to
wp-content/themes/YOUR_CHILD_THEME/woocommerce/checkout/thankyou.php
At this point, your customization will not be lost if you update WooCommerce.
Add something like this at the end of thankyou.php: (Use a plain text editor, not MS Word)
<script>
window.location = 'http://redirect-to-this-page';
</script>
Of course alter the url to suit.
If you get blank pages, your new file has a syntax error. Just rename your new thankyou.php to something else and that should get you going again.
Unfortunately if it doesn’t work, debugging from this distance may not be easy, but post your url.