Skip to content

Instantly share code, notes, and snippets.

@albionselimaj
Created March 12, 2018 16:19
Show Gist options
  • Save albionselimaj/3d32dd8305eb8f1e3083ea37c0b749e2 to your computer and use it in GitHub Desktop.
Save albionselimaj/3d32dd8305eb8f1e3083ea37c0b749e2 to your computer and use it in GitHub Desktop.
Merge "Account Details", "Payment Methods", and "Addresses" dashboard pages.
// @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