This snippet helps you reduce the number of WooCoommerce Endpoints within the MyListing dashboard.
Instead of three separate endpoints for Account, Payment Methods, and Address, you can use just the ‘Account’ endpoint (/my-account/edit-account/) to display everything.
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"
);