Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Jason. You have probably figured this out by now, but here’s the solution for future reference. Put the following anywhere in functions.php

    function my_save_account_details_redirect($user_id){
        wp_safe_redirect( wc_get_endpoint_url( 'edit-account') );
        exit;
    }
    add_action( 'woocommerce_save_account_details', 'my_save_account_details_redirect', 10, 1 );
    
    function my_save_address_redirect($user_id, $load_address){
        // $load_address is either 'billing' or 'shipping'
        wp_safe_redirect( wc_get_endpoint_url( 'edit-address', $load_address) );
        exit;
    }
    add_action( 'woocommerce_customer_save_address', 'my_save_address_redirect', 10, 2 );
    • This reply was modified 6 years, 7 months ago by martinsanne.
    Thread Starter Jason Wong

    (@eljkmw)

    G’day Martin,

    Thanks for lending a helping hand here.
    I couldn’t figure out any snippet to my question, so I just left it out. I didn’t know about the availability of those hook functions.

    I’ll include your snippet into functions.php soon. I’m currently on WooCommerce v.3.1.2

    Cheers,
    Jason

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Why does after save_address redirects to my-account page?’ is closed to new replies.