pmpro-addon-packages
pmpro-addon-packages copied to clipboard
Hide "Member Links" from Account Page when no Addons are purchased
When the Addon Package plugin is installed, all users see "Member Links" heading on the Account Page.
Can this be conditional?

This is tricky - no great way to "detect" if there is content returned from the filter or not currently. We want to rethink Member Links at some point. For now, v3.1 checks if there is anything hooking in, but not if there is something for those hooks to return.... I don't think we can resolve this easily.
As a temporary workaround, we can unhook this call to the member links if the user has no Addon Packages assigned to them.
https://gist.github.com/ipokkel/6fa054d9ad2e36c8bb6bb486e1a44068