Тёмный

Redirect to a Custom Thank You Page After Checkout in WooCommerce Without Any Plugins 

Reialesa
Подписаться 4,3 тыс.
Просмотров 40 тыс.
50% 1

The function required to do this is pinned 📌 to the top comment.
How to automatically redirect users from any page to any page, website or domain in WordPress: • Automatically Redirect...
How to redirect users to different pages based on which products they purchase after checkout in WooCommerce: • Redirect to Different ...
How to create a child theme in WordPress: • The Fastest, Easiest W...
What I use to build amazing websites:
Elementor (the best WordPress page builder): be.elementor.com/visit/?bta=2...
Awesome, affordable hosting (the server your website needs to exist): www.hostg.xyz/SHBd2
🧙 Wizards of Webcraft - A series where I’ll be reviewing your websites - www.reialesa.com/wow/ Apply now!
After your customers purchase something in WooCommerce, they're redirected to a very basic, very unappealing thank you page. There's a very easy way to fix that and to redirect them to any page on your website you wish to, without using any additional plugins. It's a great way to add some personality to your website and to improve your customers' experience.
Make sure you use a child theme and back up your WordPress website before doing this!
#WooCommerce #checkout #redirect
Get in touch:
www.reialesa.com/youtube/
Don’t be shy! Let me know what you’d like to see next, ask me anything related to design or just simply say hi.
Please note that some of the above are affiliate links, which means I earn a commission if you make a purchase, at no additional cost to you. Thank you very much if you decide to use them!

Опубликовано:

 

6 июн 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 155   
@Reialesa
@Reialesa 2 года назад
Relevant videos: How to automatically redirect users from any page to any page, website or domain in WordPress: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7ZtnlkP0f08.html How to redirect users to different pages based on which products they purchase after checkout in WooCommerce: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-W7YRxqYhBeY.html How to create a child theme in WordPress: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-iRGn5Ypm1qw.html The function required to do this 👇 /** * Redirect WooCommerce to a custom page after checkout */ add_action( 'woocommerce_thankyou', 'reialesa_redirect_woo_checkout'); function reialesa_redirect_woo_checkout( $order_id ){ $order = wc_get_order( $order_id ); $url = 'your URL here'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } }
@theHaloFM02
@theHaloFM02 Год назад
Thanks for putting the code here! Really simplifies our process in understanding and testing the code through functions.php out. 😁✨
@Reialesa
@Reialesa Год назад
More than happy to help! Thank you for your support 💪
@becoonstudio1035
@becoonstudio1035 2 месяца назад
how if failed purchase that same redirect to thank you page?
@davis.1193
@davis.1193 Год назад
Your channel is hugely undervalued. Quality is really good bro
@Reialesa
@Reialesa Год назад
Thank you, I really appreciate that, it means a lot! 🙏🙌
@Saur
@Saur Год назад
Thanks for this. It is exactly what I'm looking to do.
@Reialesa
@Reialesa Год назад
Awesome, glad I could help!
@heeebeeegeeebeee
@heeebeeegeeebeee Год назад
Worked perfectly, thank you!
@Reialesa
@Reialesa Год назад
Awesome 🤜🤛 Glad I could help!
@artistdigital535
@artistdigital535 5 месяцев назад
I have downloadable products and it doesn't seem to work in my case. Any insight?
@katcd1916
@katcd1916 2 года назад
Thank you so much for this video! It helped me a lot!!!
@Reialesa
@Reialesa 2 года назад
Awesome, I'm really glad you found it helpful! 💪
@ajbonline
@ajbonline 10 месяцев назад
Thank you this helped me out quite a bit.
@Reialesa
@Reialesa 9 месяцев назад
I'm very happy you found the video helpful. Thank you for your support, I appreciate it! 🙌🙏
@ninaket
@ninaket Год назад
So Simple, But IT WORKS !! THANK YOU SO MUCH.
@Reialesa
@Reialesa Год назад
Happy to help, thank you for your awesome comment! 🙌
@AraibButt-p7f
@AraibButt-p7f 4 дня назад
I am trying to add custom cta on the top of checkout page, did everything but still nothing works. Need help!
@JJ-vh2vp
@JJ-vh2vp 10 месяцев назад
quick and easy. Thank you!
@Reialesa
@Reialesa 10 месяцев назад
I'm happy to help, thank you for your support, I appreciate it! 🙏
@naomikoopmans
@naomikoopmans Год назад
Update: Now I got it to work. First I tried to redirect to a different website and it did not work. Now I set up a redirection to the same website and it worked. Thanks again!
@Reialesa
@Reialesa Год назад
Thanks for letting me know! Indeed, this only works for the pages of the website you use it on, not for redirecting to different, external websites. I'm very happy you managed to get it up and running! 💪
@paulwhitehead1816
@paulwhitehead1816 3 месяца назад
How do I display the customers order number on the thank you page?
@user-id3bg2ls6y
@user-id3bg2ls6y Год назад
Oh. Thank you very much bro. It is important reduce installing any plugins, which reduces speed of website.
@Reialesa
@Reialesa Год назад
Indeed! If you can avoid an extra plugin with something like this, which I feel is easier than actually setting up the plugin in the first place, it's a win-win situation. Thank you for your support.
@bms3555
@bms3555 Год назад
ITS WORKING ! THANK YOU
@Reialesa
@Reialesa Год назад
That's awesome, thank you for your support 💪
@HaifengZhu-pn3uq
@HaifengZhu-pn3uq 5 месяцев назад
Hi, how can I access the default WooCommerce thank you page?
@niffostudios4129
@niffostudios4129 3 месяца назад
But how to add things like "order details" in the custom made page?
@naomikoopmans
@naomikoopmans Год назад
Hi, great video, thanks! Question: How do I make sure there is no other way to get to the 'Thank you' page other than through redirection after purchase? How do I prevent this page from appearing accidentally in Google search results? Thanks again.
@Reialesa
@Reialesa Год назад
Hi! Thank you for the kind words. The easiest way to prevent people from finding the page is making sure the link doesn't appear anywhere where somebody can click on it. You can also set the link to something you're sure nobody will ever accidentally find. With that said, I doubt anyone will go around looking for that specific page, so I wouldn't worry too much if I were you. You can prevent the page from appearing in Google search results by using an SEO plugin such as Rank Math and making sure the page is set to ''No index''. That way, search engines won't index the page and it won't appear in search results. For more information, I recommend you check out this article: rankmath.com/kb/how-to-noindex-urls/
@HZGamingVR
@HZGamingVR Год назад
Thank you very much! :)
@Reialesa
@Reialesa Год назад
You are very welcome! Thank you for your support. 🙌
@darioperiskic4335
@darioperiskic4335 Год назад
Bravo, samo naprijed 👍🏻
@Reialesa
@Reialesa Год назад
Hvala! 💪
@naomikoopmans
@naomikoopmans Год назад
Thank you!
@web_wing
@web_wing Год назад
Thank you my man
@Reialesa
@Reialesa Год назад
Happy to help, thank you for the kind comment! 💪
@VedicAstrologer007
@VedicAstrologer007 Год назад
my dear friend thank you for your support. love from INDIA
@Reialesa
@Reialesa Год назад
Right back at you, thank you! 🙏
@blackmanonline9099
@blackmanonline9099 15 дней назад
thank you !
@AllWebSolutions
@AllWebSolutions Год назад
Thank you so Much, You save my time thanks
@Reialesa
@Reialesa 11 месяцев назад
That is great to hear, I'm happy to help. Thank you for your support! 🙌
@MrHausMausRap
@MrHausMausRap 2 месяца назад
Perfect, thank u🎉
@Reialesa
@Reialesa 2 месяца назад
Thank you for your support! 😄🙌
@bensof6567
@bensof6567 Год назад
Thank youuuuuuuuu thank you very very veeeeeeryyyyyyy much 😁😍
@Reialesa
@Reialesa Год назад
You are very welcome, I'm glad the video was helpful! 💪
@abrarsaleem9980
@abrarsaleem9980 11 месяцев назад
Amazing, it worked. thanks, it's a request that I want that user should only see thankyou page when redirected from checkout only and redirect to 404 when they try to access directly from url
@Reialesa
@Reialesa 11 месяцев назад
Awesome, I'm happy to hear that. When it comes to blocking users from accessing the page directly, I think the easiest solution is to just leave it be. It's very unlikely anyone will actively go looking for a thank you page. On the off chance anyone does, it isn't a big deal if they have access to the page either. It's a good question, however, the only relevant information I've been able to find is this: stackoverflow.com/questions/19791037/disable-direct-access-to-a-wordpress-page Alternatively, you could try forcing users to log in before they are able to buy something and you could hide the page for users that aren't logged in. However, I wouldn't recommend that. Thank you for your support! 💪
@yusufkebbe2909
@yusufkebbe2909 11 месяцев назад
Thanks bro it helps me alot
@Reialesa
@Reialesa 11 месяцев назад
I'm happy to hear that, thank you for your support! 🙏
@kandidmania
@kandidmania 8 месяцев назад
Question: how can I re-direct my customer to my Download page for videos where they can get different downloads after they pay??? Thanks.
@Reialesa
@Reialesa 7 месяцев назад
That's a good question. The way I would approach it is by using a high quality membership plugin. Then, I would just redirect them to the proper page, which would otherwise be inaccessible to non-logged in users. Another alternative is to redirect them to a page that would contain a clickable link that would then take them to the proper page. You could redirect them to the page directly, without a membership plugin, but that would mean anyone could access it. I also have a video on how you can redirect users to different pages based on the different products they purchase: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-W7YRxqYhBeY.html I hope my answer was helpful. Let me know how it goes! 💪
@mrmelody358
@mrmelody358 Год назад
Thanks. But is there a way we can add the product they purchase to the thank you page? Let say i sell a product with RU-vid video embed on it. After they buy, i want the thank you page to shoe the RU-vid video so they can watch it.
@Reialesa
@Reialesa Год назад
Glad to help! I would approach that by creating specific pages for specific products and then using the method in this video to redirect users to the appropriate page after they purchase the product: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-W7YRxqYhBeY.html
@mrmelody358
@mrmelody358 Год назад
@@Reialesa Thank you
@Joneszy78
@Joneszy78 2 года назад
thx, redirect works, but it doesn't show the woocommerce order summary, how can we add that also?
@Reialesa
@Reialesa 2 года назад
The way I would do it is by using Elementor's purchase summary widget. That's gonna be the easiest and the fastest way. If you're not using Elementor or a page builder that offers this functionality, you'll have to find and use the appropriate WooCommerce hooks and then style the page via CSS. The other alternatives are styling the default checkout page with CSS or buying the official WooCommerce plugin (WooCommerce Custom Thank You Pages), but I've never used it so I can't say if it's worth it.
@purpose6113
@purpose6113 Год назад
Great, simple tutorial 👌 I was wondering, how do I get a "child editor"? Im currently using divi
@Reialesa
@Reialesa Год назад
Hello! Thank you for your awesome comment, I'm glad the video was helpful. If by ''child editor'' you mean a child theme, it's quite simple. Here's how you can create a child theme: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-iRGn5Ypm1qw.html
@stomataaa
@stomataaa Год назад
I try but it says "Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP." I use multi site and try to implement it in the main dashboard please guide me :)
@Reialesa
@Reialesa Год назад
Hi! Unfortunately, I've never used multisite before but I can try to speculate why this doesn't work. This is based on redirecting to a specific thank you page and because of that, it will not work for redirecting to external websites or domains, so it will only work for one website at a time. So, if you add it to your multisite functions.php file, it adds it to all of them at once and you get the error. What I recommend you do is try to find a way to insert the code to just one website. The first thing I would try is creating child themes for every individual website. After you do that, technically, every website should be able to have its own functions.php file. After that, you can just add in your code to the appropriate child theme. I would recommend using a plugin called ''Child Theme Configurator'' to do this. I have a video on how to set it up on my channel. More about using the child themes here: wordpress.stackexchange.com/questions/81886/wordpress-multisite-multiple-child-theme If that doesn't work, here's another, more complicated, way you can try: stackoverflow.com/questions/28656909/wordpress-multisite-add-function-to-functions-php-to-only-affect-1-site I hope this was helpful. Good luck and let me know how it goes! 💪
@jacobasare2056
@jacobasare2056 Год назад
Hello Reialesa, how do I redirect to a thank you page for a specific product only and not all products in general?
@Reialesa
@Reialesa Год назад
Hi! I have a video that will help you do exactly that: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-W7YRxqYhBeY.html Let me know how it goes! 💪
@mwaleedtahir1707
@mwaleedtahir1707 5 месяцев назад
Thanks its working for me baba ji its working love you to hogya 😂❤🎉
@Reialesa
@Reialesa 3 месяца назад
I'm happy to hear it's working for you, thank you for your support! 🙌
@deltasignshop6309
@deltasignshop6309 Год назад
This is whwt im looking for but after your instructions are followed and tested, it takes me to woocomerce log in page
@Reialesa
@Reialesa Год назад
Correct me if I'm wrong, but that's likely because you're trying to link to another website, not another page. The page you redirect to needs to be a part of the website where the user is making the purchase.
@naomikoopmans
@naomikoopmans Год назад
Unfortunately it's not working for me.
@dandrevs
@dandrevs Год назад
Hey, I need to redirect to external URL but once I input that, once I do the payments, it redirects me to wp-admin page. Is this only for internal linking? Maybe to add more context. I'm on Breakdance builder so no child theme. I'm using Advanced Scripts to store and execute code.
@Reialesa
@Reialesa Год назад
Hi! You're quite right, this only works for internal linking and redirecting to different pages, not different websites.
@dandrevs
@dandrevs Год назад
@@Reialesa thanks. Makes sense now.
@Reialesa
@Reialesa Год назад
I created a new video that explains how you can automatically redirect to any (external) website in WordPress. And, of course, you can use it to redirect your users after checkout as well. Here's the video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7ZtnlkP0f08.html
@hassenzouari2479
@hassenzouari2479 Год назад
Thank you so much
@Reialesa
@Reialesa Год назад
Thank you for your support 👐
@taylorshields7119
@taylorshields7119 Год назад
hey bro, when I do this it says this, "Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP." how do I fix it and get it to work?
@Reialesa
@Reialesa Год назад
Hello! I've never encountered this issue, but here's what I've gathered from doing some research; first off, I'd try disabling any security plugin you have and see if that helps (don't forget to enable it back). It could also be theme permissions or other plugins causing the issue. Otherwise, you'll probably have to edit the files with something like FileZilla. I recommend you copy the error into Google and go off that, lots of cases of this issue popping up. Let me know how it goes!
@taylorshields7119
@taylorshields7119 Год назад
@@Reialesa thanks bro, I'll give those a try
@Hassan_Omer
@Hassan_Omer Год назад
It works, thank you very much for sharing this video. I have a question, is it possible to redirect to your custom page after Thank you page or Order details page ?
@Reialesa
@Reialesa Год назад
Hello! Awesome, I'm glad it helped. Redirecting to other pages from a new page is something I would do with a link or a button, so users have control over when it happens. So, use this to redirect them to whichever page and then on that page, include a link to where you want them to go next. The other way would be by using JavaScript so they get redirected automatically after a set amount of time, here's an example of how to do this: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7ZtnlkP0f08.html
@Hassan_Omer
@Hassan_Omer Год назад
@@Reialesa Thank you very much for sharing this, i'll try this method.
@117zenith
@117zenith Год назад
Legend!
@Reialesa
@Reialesa Год назад
Thank you, right back at you! 🙌
@poppeken01
@poppeken01 Год назад
Hello, can the redirection be different for different products?
@Reialesa
@Reialesa Год назад
Hello! Here's how you can do exactly that: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-W7YRxqYhBeY.html If you have a lot of products, however, I'd recommend looking for a good plugin to do this.
@H4MM4D-11
@H4MM4D-11 Год назад
But Mate what If I have added my paypment Gateway Pyapal so Obviusly when some one fill information on Checkout it will redirect them to thier paypal Right how can I redirect buyer to my Thank you page when client succesfully paid from Paypal
@Reialesa
@Reialesa Год назад
Good question. That's something I haven't tried to do yet but it seems like something you have to set up directly in PayPal. I found this and I think it will help you out: www.paypal.com/us/cshelp/article/FAQ3651 Let me know how it goes! 💪
@wavenfx
@wavenfx Год назад
What if the payment fails? How´d be the code to redirect people to a "failed payment" url??
@Reialesa
@Reialesa Год назад
Interesting question! I actually did some testing and it always stays on the checkout page in my experience. Which is, honestly, likely the best way to go about it - if your user makes a typo while trying to make a purchase, you probably don't want them to be redirected and have to go through the whole process again. I wish I had a more specific answer for you but at this time, I can't seem to find a viable way to make this happen.
@sensibleced
@sensibleced Год назад
My Thank you page is blank and I want to show the order details. Any tips on how to fix this?
@Reialesa
@Reialesa Год назад
For that, this likely isn't the best way. A better way would be to style the original thank you page and change out the content or, the easier way (usually), use whichever method your page builder allows. For example, I use Elementor and in Elementor, I would just add in the ''Purchase Summary'' widget to my page and set that page as the ''Purchase Summary'' page in my Site Settings. That would mean that page is the page that gets redirected to when an order is made, it would include the order details and I can add in any content I want and style everything however I want. Of course, that means you don't need the method shown in the video. The method shown in the video is perfect for setting thank you pages that are disconnected from the actual usual checkout process or for page builders that don't have that option. If that applies to your situation, you can try adding in the shortcode [woocommerce_checkout] to your page but I'm not sure how effective the combination is going to be. Let me know how it goes! 💪
@ariookii3685
@ariookii3685 4 месяца назад
Thankss, verry helpful
@Reialesa
@Reialesa 2 месяца назад
It's great to hear you found the video helpful, thank you for your support! 🙌
@anouarhimad
@anouarhimad Год назад
it's not working for me , I get this message " Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP."
@Reialesa
@Reialesa Год назад
Try disabling any security plugins you have and see if that helps (don't forget to enable them back afterwards). It could also be because of a certain plugin or because of theme permissions. If none of these work, edit the files directly via cPanel or, if you don't have cPanel, try using something like FileZilla to edit them. If all else fails, I recommend copying the error into Google as you'll find many people have this issue for many different reasons. Let me know how it goes!
@kairimae2502
@kairimae2502 7 месяцев назад
I don't have Appearance - Theme File Editor. I tryed it with Code Snippets but it dosn't work there.
@narrayandeluck4188
@narrayandeluck4188 6 месяцев назад
The same here. Did you find out how to fix it?
@kairimae2502
@kairimae2502 6 месяцев назад
@@narrayandeluck4188 I took plugin "Thank You Page for WooCommerce". With that you can add thank you page in your product section, where you put price. You can make thank you page and add that URL there.
@Reialesa
@Reialesa 5 месяцев назад
There are quite a few possible reasons for that. If your permissions are all okay, it's most likely that a security plugin is hiding it. Disabling those options within the security plugin should allow you to access the Theme File Editor. Where they are depends on the plugin you're using. For the other possible reasons, this article explains it better than I could within a comment: nichetwins.com/wordpress-theme-editor-missing/
@taylorshields7119
@taylorshields7119 Год назад
hey again, i updated my them and tried to re-do the code again as it worked after you help last time, but now after disabling the security plugins like last time its still not working??
@Reialesa
@Reialesa Год назад
Okay, let's start from the beginning. 1. Which theme are you using? 2. Are you using a child theme? 3. Try to install a file manager plugin (Advanced File Manager for example), then try adding the code inside the functions.php file via that plugin directly (wp-content > themes > your child theme > functions.php > right click and edit). Don't forget to backup first 😁
@taylorshields7119
@taylorshields7119 Год назад
@@Reialesa I'm using the Divi theme, but I can't seem to find a child Divi theme. As you mentioned in the vid I presume this is the issue when updated the theme, I restored my backup to get back to when it was working so would it be ok if I just don't update my theme?
@Reialesa
@Reialesa Год назад
Okay, so that's likely the issue. The best way to go about this is to install a plugin called Child Theme Configurator. Then, using the plugin, create a child theme, it's very simple. If you get stuck, my ''Elementor Beginner Tutorial'' video shows how it's done at around 3 minutes 30 seconds. Next, activate the child theme (you can also uninstall the plugin after you create the child theme). The next step is to edit the functions.php again and in your case, you might have to disable the security plugin to do so, just like you did the first time. If you aren't using a child theme, all of the changes you make to a theme disappear when it gets updated. I wouldn't recommend simply not updating your theme because some updates may be very important, so a child theme is the perfect solution.
@taylorshields7119
@taylorshields7119 Год назад
@@Reialesa brilliant, I'll give that a go and let you know if it doesn't work. Thanks heaps mate your a legend !
@taylorshields7119
@taylorshields7119 Год назад
@@Reialesa I tried that and it didn't work, I'm not using elementaor builder I'm using the divi builder and what do I do once I've activates the child theme plugin as nothing seems to change once I installed it ?
@user-ei6su1li4i
@user-ei6su1li4i Год назад
doesn't work , it redirects me on my own admin wp website? any solutions? thanks in advance
@Reialesa
@Reialesa Год назад
Hi! That happens if you try to redirect to another website. This only works for redirecting to different pages, not external websites.
@sambucolazerbaijan
@sambucolazerbaijan 4 месяца назад
What If I want to add different thank you pages for different products checkout
@Reialesa
@Reialesa 4 месяца назад
Hello! I have a video that will show you how to do exactly that. Here it is: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-W7YRxqYhBeY.html
@outlawgeek420
@outlawgeek420 Год назад
Where is the code? Can't find it down below and Ive scrolled passed Australia 😅
@Reialesa
@Reialesa Год назад
Sorry about that! RU-vid won't let me post it in the description because of the ''angled brackets'' and the pinned comment is acting up. Sometimes it shows up correctly, sometimes it doesn't. Anyhow, here it is: /** * Redirect WooCommerce to a custom page after checkout */ add_action( 'woocommerce_thankyou', 'reialesa_redirect_woo_checkout'); function reialesa_redirect_woo_checkout( $order_id ){ $order = wc_get_order( $order_id ); $url = 'your URL here'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } }
@moseskramer5346
@moseskramer5346 Год назад
Awesome content 😁Anybody any idea on how to implement with multilanguage Wordpress shop? using polylang for woocommerce and want to redirect to static page according to language setting of user
@Reialesa
@Reialesa Год назад
Great question. I would assume the page gets translated, just like any other page, if the user chose a specific language. For example, I'm using TranslatePress and when somebody visits the Slovenian version of my website, the URL is reialesa.com/sl/. Any page they then visit has /sl/ in the URL as well, for example, reialesa.com/sl/branding. Meaning, every other page they visit is also translated. I haven't worked with Polylang yet but I assume the way it works is similar, if not the same. So, I also assume the thank you page should work like other pages and get automatically redirected to the correct language like other pages. I found this and, after giving it a quick read, I think your issue is connected to the way Polylang approaches URLs: polylang.wordpress.com/documentation/setting-up-a-wordpress-multilingual-site-with-polylang/settings/ I recommend you go through it, it just might give you the answers you need. Thank you very much for your support and kind words! 🙌
@mibesports2575
@mibesports2575 Год назад
Thank you
@Reialesa
@Reialesa Год назад
Happy to help! 🙌
@j.l.cooper70
@j.l.cooper70 Год назад
Love this! how to I redirect to a different page per product?
@Reialesa
@Reialesa Год назад
I'm glad you like it! To redirect to different pages based on the product purchased, check out this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-W7YRxqYhBeY.html
@Lesslypl
@Lesslypl 11 месяцев назад
Doesn't it mess up with meta pixel and google analytics?
@Reialesa
@Reialesa 10 месяцев назад
Good question. I'd imagine it shouldn't affect your analytics or ads in most cases but I can't say for sure. For example, if, in your ads, your conversion event is simply your users arriving at the thank you page, it shouldn't be a problem. For others, I can't say for sure. The very best (and pretty much the only) way to figure out how it affects your analytics or advertising efforts is to thoroughly test it out for your specific website.
@tmclipsit
@tmclipsit Год назад
what if i have multiple products
@Reialesa
@Reialesa Год назад
If you mean redirecting your user based on which product they purchase, here's how you can do that: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-W7YRxqYhBeY.html
@hari4375
@hari4375 2 года назад
thanks sir...
@Reialesa
@Reialesa 2 года назад
You're very welcome, thank you for your support!
@madtings6736
@madtings6736 4 месяца назад
I cant locate the code with the function in the description
@Reialesa
@Reialesa 4 месяца назад
Hello! It's available in the pinned comment. Here it is 👇 /** * Redirect WooCommerce to a custom page after checkout */ add_action( 'woocommerce_thankyou', 'reialesa_redirect_woo_checkout'); function reialesa_redirect_woo_checkout( $order_id ){ $order = wc_get_order( $order_id ); $url = 'your URL here'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } }
@utmanzpoultryreviews1931
@utmanzpoultryreviews1931 2 года назад
Simple ❤
@Reialesa
@Reialesa 2 года назад
Glad you liked it!
@webculturetechnologies5517
@webculturetechnologies5517 2 года назад
Great
@khalidsblog786
@khalidsblog786 4 месяца назад
not work brother🙁🙁
@KillahManjaro
@KillahManjaro 10 месяцев назад
Thanks. Sub! Can I use Code Snippet plugign with this? I like to have all my custom codes in one place.
@Reialesa
@Reialesa 10 месяцев назад
I'm happy to help, thank you for your support, I appreciate it! 💪 I've never used the Code Snippets plugin, but as far as I can tell, that's exactly what it's for, so it should work just fine. Let me know how it goes! 🤞
@KillahManjaro
@KillahManjaro 10 месяцев назад
@@Reialesa Will do. No problem with the support.
@shamimarman5159
@shamimarman5159 6 месяцев назад
Where is code? Could you please give me the code?
@Reialesa
@Reialesa 6 месяцев назад
Hi! Here it is 👇 /** * Redirect WooCommerce to a custom page after checkout */ add_action( 'woocommerce_thankyou', 'reialesa_redirect_woo_checkout'); function reialesa_redirect_woo_checkout( $order_id ){ $order = wc_get_order( $order_id ); $url = 'your URL here'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } }
@todorzubac7476
@todorzubac7476 Год назад
where i can download the php code?
@Reialesa
@Reialesa Год назад
Hi! Looks like the pinned comment is acting up again. Sometimes it shows up correctly, sometimes it doesn't. Anyhow, here it is: /** * Redirect WooCommerce to a custom page after checkout */ add_action( 'woocommerce_thankyou', 'reialesa_redirect_woo_checkout'); function reialesa_redirect_woo_checkout( $order_id ){ $order = wc_get_order( $order_id ); $url = 'your URL here'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } }
@ramakrishnapanigrahi
@ramakrishnapanigrahi Год назад
Please make more wocommerce videos
@Reialesa
@Reialesa Год назад
I can't make any promises but as soon as I find something worth making a video about, I'll make it! WooCommerce is a very extensive topic, so I'm sure something will come up sooner rather than later.
@kemissalinas7235
@kemissalinas7235 Год назад
thanks
@Reialesa
@Reialesa Год назад
Happy to help, thank you for your support 🙏
@marcelllamariadebruijn5714
@marcelllamariadebruijn5714 4 месяца назад
dont find the code...
@Reialesa
@Reialesa 4 месяца назад
Hello! It's available in the pinned comment. Here it is 👇 /** * Redirect WooCommerce to a custom page after checkout */ add_action( 'woocommerce_thankyou', 'reialesa_redirect_woo_checkout'); function reialesa_redirect_woo_checkout( $order_id ){ $order = wc_get_order( $order_id ); $url = 'your URL here'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } }
@ShanawarButt-ez1qj
@ShanawarButt-ez1qj 3 месяца назад
where is the code?
@Reialesa
@Reialesa 2 месяца назад
Here you go (you can also find it in the pinned comment): The function required to do this 👇 /** * Redirect WooCommerce to a custom page after checkout */ add_action( 'woocommerce_thankyou', 'reialesa_redirect_woo_checkout'); function reialesa_redirect_woo_checkout( $order_id ){ $order = wc_get_order( $order_id ); $url = 'your URL here'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } }
@walidettaoussi1811
@walidettaoussi1811 6 месяцев назад
where is the code
@Reialesa
@Reialesa 6 месяцев назад
Hi. It's available in the pinned comment. Here it is 👇 /** * Redirect WooCommerce to a custom page after checkout */ add_action( 'woocommerce_thankyou', 'reialesa_redirect_woo_checkout'); function reialesa_redirect_woo_checkout( $order_id ){ $order = wc_get_order( $order_id ); $url = 'your URL here'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } }
@winzmall7595
@winzmall7595 11 месяцев назад
How to find code
@Reialesa
@Reialesa 11 месяцев назад
Hi! Here it is (you can also find it in the pinned comment) 👇 /** * Redirect WooCommerce to a custom page after checkout */ add_action( 'woocommerce_thankyou', 'reialesa_redirect_woo_checkout'); function reialesa_redirect_woo_checkout( $order_id ){ $order = wc_get_order( $order_id ); $url = 'your URL here'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } }
@ArtPrintRevolution
@ArtPrintRevolution Год назад
available down below @ 0:45 where in australia? ffs!
@Reialesa
@Reialesa Год назад
You're right, I just noticed the pinned comment isn't always displaying correctly. It's most likely a bug, hopefully it gets fixed soon! 🤞
@jayroo10
@jayroo10 Год назад
Where is the code? I can't see it anywhere, did you take it off?
@Reialesa
@Reialesa Год назад
Sorry about that! RU-vid won't let me post it in the description because of the ''angled brackets'' and the pinned comment is acting up. Sometimes it shows up correctly, sometimes it doesn't. Anyhow, here it is: /** * Redirect WooCommerce to a custom page after checkout */ add_action( 'woocommerce_thankyou', 'reialesa_redirect_woo_checkout'); function reialesa_redirect_woo_checkout( $order_id ){ $order = wc_get_order( $order_id ); $url = 'your URL here'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } }
Далее
13 Things To Remove From Your Website Immediately
12:33
▼КОРОЛЬ СОЖРАЛ ВСЕХ 👑🍗
29:48
Просмотров 323 тыс.
Документы для озокомления😂
00:24
I Got #1 in Google with 7 Minutes of Beginner SEO
14:44
▼КОРОЛЬ СОЖРАЛ ВСЕХ 👑🍗
29:48
Просмотров 323 тыс.