From 2e90910389522fd2c9819fddd536a536340b7e4f Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 6 Jan 2012 14:49:11 +0000 Subject: [PATCH] woocommerce_checkout_no_payment_needed_redirect hook Closes #464. --- classes/checkout.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/checkout.class.php b/classes/checkout.class.php index 914c44e920b..b2d5ac8b7a1 100644 --- a/classes/checkout.class.php +++ b/classes/checkout.class.php @@ -588,10 +588,10 @@ class woocommerce_checkout { // Redirect to success/confirmation/payment page if (is_ajax()) : ob_clean(); - echo json_encode( array('redirect' => get_permalink(get_option('woocommerce_thanks_page_id'))) ); + echo json_encode( array('redirect' => apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', get_permalink(get_option('woocommerce_thanks_page_id')))) ); exit; else : - wp_safe_redirect( get_permalink(get_option('woocommerce_thanks_page_id')) ); + wp_safe_redirect( apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', get_permalink(get_option('woocommerce_thanks_page_id'))) ); exit; endif;