Why does after save_address redirects to my-account page?
-
I’m still using WooCommerce 2.6.14, and noticed that after saving the address on My Account page, it redirects back to My Account page. I found that
/woocommerce/includes/class-wc-form-handler.php
contains the save_address() and save_account_details() functions. At the end of their functions is a safe redirect function, which redirects to My Account page.wp_safe_redirect( wc_get_page_permalink( 'myaccount' ) );
I wish to have it changed to:
wp_safe_redirect( wc_get_endpoint_url( 'edit-address', '', wc_get_page_permalink( 'myaccount' ) ) ); wp_safe_redirect( wc_get_endpoint_url( 'edit-account', '', wc_get_page_permalink( 'myaccount' ) ) );
without the need to hack into WooCommerce’s core. A snippet is what I’m looking for, which can be added into the active theme’s functions.php.
Please help. Thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
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.