RTFM

Thank You Redirects

for WooCommerce
Thank You Redirects
Current Version
1.4.2
Requires WordPress
6.5
Tested Up To
7.0
Translations included
πŸ‡ΊπŸ‡Έ English
πŸ‡ͺπŸ‡Έ Spanish
πŸ‡«πŸ‡· French
πŸ‡©πŸ‡ͺ German
πŸ‡¨πŸ‡³ Chinese
πŸ‡―πŸ‡΅ Japanese

Overview

Thank You Redirects lets you send WooCommerce customers to a custom page immediately after checkout. You can use one global redirect for every order or create product-specific rules and control their priority.

Requirements

  • WordPress 6.5 or newer
  • WooCommerce 8.0 or newer
  • PHP 8.2 or newer

What The Plugin Does

  • Redirects customers from the WooCommerce thank-you page to a custom destination
  • Supports one global redirect URL
  • Supports sortable per-product redirect rules
  • Passes secure order context to the destination URL automatically
  • Provides shortcodes and blocks for displaying order details on the destination page
  • Includes a starter block pattern for a custom confirmation page

Installation

  1. Upload the plugin folder to /wp-content/plugins/ or install it through the WordPress admin.
  2. Activate Thank You Redirects.
  3. In WordPress admin, go to WooCommerce > Thank You Redirects.
  4. Create the page you want customers to land on after checkout.
  5. Add the provided blocks or shortcodes to that page if you want to display order information.
  6. Save your redirect settings.

Configuration

Global Redirect URL

Use this when every order should go to the same page.

  • Relative paths are supported, such as /thank-you/custom
  • Full URLs are also supported, such as https://example.com/onboarding
  • Order context is appended automatically when a redirect runs

Per-Product Redirects

Use this when different products should send customers to different pages.

  • Add one row per product rule
  • Search for a product in the product selector
  • Enter a relative path or full URL
  • Drag rows to change priority
  • If an order matches multiple rules, the top-most rule wins

Building A Destination Page

You can use either shortcodes or blocks on the destination page.

Available Shortcodes

  • [mbtyr_order_id]
  • [mbtyr_order_number]
  • [mbtyr_order_total]
  • [mbtyr_customer_email]
  • [mbtyr_customer_phone]
  • [mbtyr_billing_address]
  • [mbtyr_shipping_address]
  • [mbtyr_order_meta key="_payment_method_title"]
  • [mbtyr_order_items]

Available Blocks

  • Order ID
  • Order Number
  • Order Total
  • Customer Email
  • Customer Phone
  • Billing Address
  • Shipping Address
  • Order Items
  • Order Meta

Included Pattern

The block inserter also includes Thank You Confirmation Page, which gives you a quick starter layout for a custom confirmation page.

Order Context And Privacy

The plugin adds secure order context to the destination URL so shortcodes and blocks can render the current order. Treat destination pages as private customer-facing pages. Anyone with the full redirected URL can view the order details attached to that link.

Uninstall Behavior

When the plugin is deleted from the WordPress Plugins screen, it removes its saved settings from the database.

Localization

The plugin includes translation files for German, Spanish, French, Chinese, Italian, and Japanese. User-facing strings are prepared for translation with the thank-you-redirects text domain.

Troubleshooting

Redirect does not happen

  • Confirm the order reaches the WooCommerce thank-you step
  • Make sure the redirect URL field is not empty
  • If using product rules, confirm the purchased product matches a configured rule
  • Check for caching or custom checkout code that interrupts the thank-you flow

Blocks or shortcodes show placeholders or no order data

  • Open the destination page using a real redirected checkout URL
  • Confirm the page was reached through the plugin redirect
  • Make sure WooCommerce remains active
  • Example placeholder panels are only meant for block-editor preview states; on the live front end a valid redirected order now suppresses those examples and shows either real data or nothing for empty fields

External URL does not open

  • Confirm the destination URL is a valid http or https address
  • Check whether another plugin is interfering with redirects or allowed hosts

Developers

The plugin exposes filters and actions so you can customize redirect behavior.

Filter: mbtyr_should_redirect

Use this filter to conditionally stop a redirect before it happens.

add_filter( 'mbtyr_should_redirect', function ( $should_redirect, $target, $order, $context ) {
    if ( 'product' === $context && $order->get_total() < 10 ) {
        return false;
    }

    return $should_redirect;
}, 10, 4 );

Filter: mbtyr_redirect_destination

Use this filter to change the final destination URL after order context has been added.

add_filter( 'mbtyr_redirect_destination', function ( $destination, $order, $target, $context ) {
    return add_query_arg(
        'campaign',
        'post-purchase',
        $destination
    );
}, 10, 4 );

Filter: mbtyr_redirect_status_code

Use this filter to change the redirect HTTP status code. The plugin accepts only 3xx values and falls back to 302 otherwise.

add_filter( 'mbtyr_redirect_status_code', function ( $status_code, $destination, $order, $context ) {
    if ( 'global' === $context ) {
        return 303;
    }

    return $status_code;
}, 10, 4 );

Action: mbtyr_before_redirect

Use this action to log or react to the redirect just before it is sent.

add_action( 'mbtyr_before_redirect', function ( $destination, $order, $context ) {
    error_log(
        sprintf(
            'Thank You Redirects sending order %d to %s (%s)',
            $order->get_id(),
            $destination,
            $context
        )
    );
}, 10, 3 );

Changelog

1.4.2 – 2026-06-02

  • Add the suite-standard WellPlayedWP Library dependency notice on the Plugins screen.
  • Refactor updater loading so update checks only load in WordPress admin.
  • Fix WooCommerce tested metadata consistency between the plugin header and readme.
  • Document localization support and maintenance release details.

1.4.1 – 2026-04-11

  • Fix block example placeholders so live redirected orders no longer show example content for empty fields.
  • Document the maintenance release version metadata.

1.4.0 – 2026-04-04

  • Add uninstall cleanup for stored plugin settings.
  • Add compatibility guards for supported WordPress, PHP, and WooCommerce versions.
  • Fix redirect validation hardening and expose developer hooks for redirect behavior.
  • Add inline admin setup guidance and privacy notes around order-detail pages.
  • Add Chinese localization support and refresh translation files.