=== Advanced Redirect Thank You for WooCommerce – Custom Thank You Page per Product & Payment ===
Contributors: actpro, freemius
Tags: woocommerce thank you page, custom thank you page, thank you page redirect, redirect after checkout, order received page
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
WC tested up to: 11.1
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Redirect WooCommerce customers to a custom thank you page after checkout, per product, per payment method or globally, with order details.

== Description ==

**Advanced Redirect Thank You for WooCommerce** replaces the default WooCommerce thank you page (the "Order received" page) with any WordPress page you choose. Redirect customers after checkout to a custom thank you page based on the **product they bought**, the **payment method they used**, or send everyone to one **global thank you page**.

Build the page with the block editor, Elementor or any page builder, then add the `[wmprty_order_detail]` shortcode to show the order number, date, products and totals. No template overrides and no code.

A custom WooCommerce thank you page is the best spot for a follow-up offer: product recommendations, a coupon for the next order, a video, a review request or social sharing. The customer has just paid, so they are paying attention.

= Live demo =

[Try the free demo](https://demo.wpactpro.com/redirect-thank-you-page/) to see the plugin running in a live WooCommerce store.

= Free features =

* **Thank you page per product**: send buyers of a specific product to their own thank you page.
* **Thank you page per payment method**: for example, show bank details to Direct Bank Transfer customers and pickup steps to Cash on Delivery customers.
* **Global thank you page**: one custom thank you page for every order that has no product or payment rule.
* **Order details shortcode**: `[wmprty_order_detail]` shows the order number, date, customer name, payment method, items and totals on any page.
* **Private order details**: details only show with the order's secret key (added to the redirect automatically), to the logged-in customer who placed the order, or to shop managers.
* **Enable or disable each rule**, plus duplicate, delete, search and bulk actions.
* **Fast product and page search**: dropdowns load 10 items at a time and load more as you scroll, so they stay fast on stores with thousands of products.
* **Works with the WooCommerce Checkout block** and the classic checkout.
* **Variable products**: a rule on the parent product covers every variation.
* Failed orders are never redirected, so customers still see WooCommerce's payment error.

= How the redirect works =

When an order is placed, the plugin checks your rules in this order and uses the first match:

1. **Product rule**: any product in the order has an enabled product rule.
2. **Payment method rule**: the order's payment gateway has an enabled payment rule.
3. **Global thank you page**: if it is enabled in WooCommerce > Settings > Global Redirect Thank You Page.

If nothing matches, the customer sees the normal WooCommerce order received page.

= Use cases =

* Show **bank transfer instructions** only to customers who pay by Direct Bank Transfer.
* Send **store pickup** or Cash on Delivery customers a page with the pickup address and opening hours.
* Give **course, membership or coaching** buyers their next steps and login links.
* Offer a **coupon for the next purchase** or a limited-time **upsell** after checkout.
* Show **pre-order** customers the expected availability date.
* Ask for a **review**, a **newsletter** sign-up or a **social share** after purchase.
* Replace the default WooCommerce order received page **without editing theme templates**.

= Pro features =

The Pro version adds:

* Redirect to a **custom URL** (including external sites) per product, per payment method or globally.
* **Multiple products per rule**.
* A **custom failed-order page** or URL.

= Support =

Questions or problems? Open a topic in the [support forum](https://wordpress.org/support/plugin/redirect-thank-you-page/) or email [wpactpro@gmail.com](mailto:wpactpro@gmail.com).

== Installation ==

1. In your WordPress admin, go to **Plugins > Add New**, search for "Advanced Redirect Thank You for WooCommerce" and click **Install Now**, then **Activate**. WooCommerce must be active.
2. Create the page customers should land on and add the `[wmprty_order_detail]` shortcode where the order details should appear.
3. Go to **WooCommerce > Redirect Thank You**.
4. On **Product Redirect**, click **Add New**, choose a product and your thank you page, tick **Status** and save.
5. On **Payment Gateway Redirect**, add rules for payment methods the same way.
6. For a store-wide page, go to **WooCommerce > Settings > Global Redirect Thank You Page**, enable it and choose the page.
7. Place a test order to check the redirect.

== Frequently Asked Questions ==

= How do I create a custom thank you page in WooCommerce? =

Create a normal WordPress page, add the `[wmprty_order_detail]` shortcode, and choose that page in a product rule, a payment method rule or the global setting. The plugin redirects customers there after checkout.

= Which thank you page is used if more than one rule matches? =

Product rules come first, then payment method rules, then the global thank you page. If no rule matches, WooCommerce's default order received page is shown.

= Does it work when the cart has several products? =

Yes. If any product in the order has an enabled product rule, the customer is redirected to that rule's page.

= Does it work with variable products? =

Yes. Create the rule for the parent (variable) product and it applies to all of its variations.

= Does it work with the WooCommerce Checkout block? =

Yes. The redirect happens on the order received page, which both the Checkout block and the classic `[woocommerce_checkout]` shortcode use.

= Can other visitors see a customer's order details? =

No. The `[wmprty_order_detail]` shortcode only shows an order when the URL has that order's secret key (the redirect adds it for you), to the logged-in customer who placed it, or to shop managers. Changing the order number in the URL shows nothing.

= Are failed orders redirected? =

No. Orders with a failed status stay on the WooCommerce page so customers can see the payment error and try again. The Pro version can send failed orders to a page or URL of your choice.

= Do I need to edit theme files or templates? =

No. Everything is configured in the admin and the page is built with your normal editor or page builder.

= Can I redirect to an external URL instead of a page? =

Redirecting to a custom URL is part of the Pro version. The free version redirects to pages on your site.

== Screenshots ==

1. Global thank you page setting under WooCommerce > Settings.
2. Payment gateway redirect rules list with status and search.
3. Add a product redirect: choose the product and its custom thank you page.
4. Pro: one redirect rule for several products, with a custom URL.
5. Add a payment gateway redirect: choose the payment method and its thank you page.
6. Add the [wmprty_order_detail] shortcode to your custom thank you page.
7. Custom WooCommerce thank you page showing the order details.

== Upgrade Notice ==

= 1.0.1 =
Security and bug-fix release. Order details now require the order key that the redirect adds to the URL, so old bookmarked links without the key will not show order details. If a CDN or proxy filters query parameters, make sure "order" and "key" are passed through.

== Changelog ==

= 1.0.1 - 2026-09-25 =
* Security: order details now require the order key, the order's customer, or a shop manager. Previously any visitor could view an order by changing the order ID in the URL.
* Security: redirects now include the order key.
* Security: the product, page and payment lookups used by the admin screens are no longer available to logged-out visitors and now require a nonce and the manage_woocommerce capability.
* Security: bulk actions now verify the correct nonce and capability.
* New: the settings page moved to WooCommerce > Redirect Thank You. Old links under Products redirect to it.
* New: declared compatible with High-Performance Order Storage (HPOS) and the Cart and Checkout blocks.
* New: product, payment method and page dropdowns show 10 results when opened, load more as you scroll and search as you type.
* New: the global thank you page setting uses the same fast page search.
* Fix: orders with more than one product now match product redirect rules.
* Fix: Duplicate and Delete caused a fatal error on PHP 8.
* Fix: rule names with quotes, accents or backslashes were saved incorrectly and emptied the edit form.
* Fix: the Payment Gateway Redirect tab now shows confirmation messages.
* Fix: "&" and other special characters in product and page names display correctly.
* Fix: selected text is vertically centred in the dropdowns.
* Fix: PHP 8.1 and 8.2 deprecation notices.

= 1.0 - 2021-08-08 =
* Initial release.
