Skip to content

Instantly share code, notes, and snippets.

@RiaanKnoetze
Created June 21, 2024 09:19
Show Gist options
  • Save RiaanKnoetze/2cd9a01ffdcf451c7ec9fd96b344c16f to your computer and use it in GitHub Desktop.
Save RiaanKnoetze/2cd9a01ffdcf451c7ec9fd96b344c16f to your computer and use it in GitHub Desktop.
Remove specific endpoints from WooCommerce my-account page
<?php
add_filter( 'woocommerce_account_menu_items', 'customize_my_account_menu' );
function customize_my_account_menu( $items ) {
// Remove the 'downloads' endpoint
unset($items['downloads']);
// Remove the 'edit-address' endpoint
unset($items['edit-address']);
return $items;
}
?>
@anastas10s-afk
Copy link

Very useful, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment