Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t think there is an easier way.

    Start by making a child theme:
    http://codex.wordpress.org/Child_Themes

    Then make a plain text file called functions.php in the root of your child theme. It should contain:

    <?php
      add_action ('woocommerce_thankyou', 'newthankyou');
      function newthankyou($order_id) {
        $order = new WC_Order($order_id);
        foreach($order->get_items() as $item) {
          if ($item['product_id'] == 154) {
            wp_redirect('http://www.yoururl.com/your-thank-you-page');
          }
        }
      }

    Alter the product id and the url to suit your needs.

    Thread Starter seniormasters

    (@seniormasters)

    Thank you
    M

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘redirect after checkout’ is closed to new replies.