Redirect to My Account page after adding method

Part of #3396
This commit is contained in:
thenbrent 2013-11-01 14:14:00 -07:00
parent 0e4cd125c5
commit 1e0cf3087e
1 changed files with 2 additions and 3 deletions

View File

@ -305,13 +305,12 @@ class WC_Form_Handler {
// Process
if ( wc_error_count() == 0 ) {
$result = $available_gateways[ $payment_method ]->add_payment_method();
// Redirect to success/confirmation/payment page
if ( $result['result'] == 'success' ) {
wp_redirect( $result['redirect'] );
exit;
wp_safe_redirect( get_permalink( woocommerce_get_page_id( 'myaccount' ) ) );
exit();
}
}