Added order to filter. #464.
This commit is contained in:
parent
c407d60d85
commit
4929dd4c4b
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue