woocommerce_checkout_no_payment_needed_redirect hook Closes #464.
This commit is contained in:
parent
86f6d68bbe
commit
2e90910389
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue