Skip to content

Instantly share code, notes, and snippets.

@adambradford
Created March 30, 2018 14:02
Show Gist options
  • Save adambradford/b30402b65e0a071d3408fd2a428cc319 to your computer and use it in GitHub Desktop.
Save adambradford/b30402b65e0a071d3408fd2a428cc319 to your computer and use it in GitHub Desktop.
Remove the 'Downloads' link from My Account page in WooCommerce
<?php
//* Add this to your functions.php file. Do NOT include the opening php tag
// Remove the 'Downloads' link from My Account page in WooCommerce
add_filter( 'woocommerce_account_menu_items', 'custom_woocommerce_account_menu_items' );
function custom_woocommerce_account_menu_items( $items ) {
if ( isset( $items['downloads'] ) ) unset( $items['downloads'] );
return $items;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment