woocommerce_checkout_no_payment_needed_redirect hook Closes #464.

This commit is contained in:
Mike Jolley 2012-01-06 14:49:11 +00:00
parent 86f6d68bbe
commit 2e90910389
1 changed files with 2 additions and 2 deletions

View File

@ -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;