The Blizzard UI with the exception of LOD addons is loaded before 3rd party addons which means yoiu don't need to create a frame and wait for an event to do what you are wanting.
That asside, I was obviously having a bad day yesterday, OnShow won't fire until after a frame has been hidden in order to actually Show.
This would be your entire addon:
Lua Code:
AddonCompartmentFrame:SetScript("OnShow", function(self)
self:Hide()
end)
AddonCompartmentFrame:Hide()
ExpansionLandingPageMinimapButton:SetScript("OnShow", function(self)
self:Hide()
end)
ExpansionLandingPageMinimapButton:Hide()
Added the OnShow/Hide for ExpansionLandingPageMinimapButton (for characters leveling into an expansion where it becomes available)