Added order to filter. #464.

This commit is contained in:
Mike Jolley 2012-01-18 12:32:39 +00:00
parent c407d60d85
commit 4929dd4c4b
1 changed files with 8 additions and 2 deletions

View File

@ -595,10 +595,16 @@ class woocommerce_checkout {
// Redirect to success/confirmation/payment page
if (is_ajax()) :
echo json_encode( array('redirect' => apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', get_permalink(woocommerce_get_page_id('thanks')))) );
echo json_encode(
array(
'redirect' => apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', get_permalink(woocommerce_get_page_id('thanks')), $order)
)
);
exit;
else :
wp_safe_redirect( apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', get_permalink(woocommerce_get_page_id('thanks'))) );
wp_safe_redirect(
apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', get_permalink(woocommerce_get_page_id('thanks')), $order)
);
exit;
endif;