Customize Thank you page in WooCommerce

Go TO

WordPress Dashboard>>>Appearence>>>Editor

Edit functions.php line 19

<?php
/**
* @package Infinite
* @author YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/

// load config
require_once(dirname(__FILE__).’/config.php’);

// Redirect custom thank you

add_action( ‘woocommerce_thankyou’, ‘bbloomer_redirectcustom’);

function bbloomer_redirectcustom( $order_id ){
$order = new WC_Order( $order_id );

$url = ‘put your site url here’;

if ( $order->status != ‘failed’ ) {
wp_redirect($url);
}
}

 

ATENTION

Dont forget to change this in case of moving the site to another domain or folder.

Advertisements

About tudor.stanica

Freelancer webdesigner and photographer.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: