Created
June 21, 2024 09:19
-
-
Save RiaanKnoetze/2cd9a01ffdcf451c7ec9fd96b344c16f to your computer and use it in GitHub Desktop.
Remove specific endpoints from WooCommerce my-account page
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
<?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; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very useful, thank you!