pmpro-addon-packages icon indicating copy to clipboard operation
pmpro-addon-packages copied to clipboard

Hide "Member Links" from Account Page when no Addons are purchased

Open kimwhite opened this issue 3 years ago • 2 comments

When the Addon Package plugin is installed, all users see "Member Links" heading on the Account Page. Can this be conditional? Screen Shot 2022-08-12 at 9 16 58 AM

kimwhite avatar Aug 12 '22 13:08 kimwhite

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.

kimcoleman avatar Jul 16 '24 20:07 kimcoleman

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

ipokkel avatar Nov 22 '24 05:11 ipokkel