Created
March 12, 2018 16:19
-
-
Save albionselimaj/3d32dd8305eb8f1e3083ea37c0b749e2 to your computer and use it in GitHub Desktop.
Merge "Account Details", "Payment Methods", and "Addresses" dashboard pages.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @link https://businessbloomer.com/woocommerce-merge-account-tabs/ | |
// Credit: Rodolfo Melogli | |
add_filter( 'woocommerce_account_menu_items', function( $items ) { | |
unset($items['edit-address']); | |
unset($items['payment-methods']); | |
return $items; | |
}, 999 ); | |
add_action( 'woocommerce_account_edit-account_endpoint', 'woocommerce_account_payment_methods' ); | |
add_action( 'woocommerce_account_edit-account_endpoint', 'woocommerce_account_edit_address' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment