Nameplate Aura Addon Stopped Working

I’ve been using this script to filter nameplate buffs and debuffs, and it recently stopped working. It hides all nameplate auras now. BugGrabber is not getting anything.

local whitelist = {
    [SpellID] = "player",--Aura Name
    [SpellID] = "pet",--Aura Name
    [SpellID] = "all",--Aura Name
    
}
 
local function newShouldShowBuff(self, name, caster, nameplateShowPersonal, nameplateShowAll, duration)
    if not name then return false end
    local filter = "INCLUDE_NAME_PLATE_ONLY"
    if UnitIsUnit(self.unit, "player") then
        filter = "HELPFUL|"..filter
    elseif UnitIsFriend(self.unit, "player") then
        return true
    else
        filter = "HARMFUL|"..filter
    end
    for i=1, BUFF_MAX_DISPLAY do 
        local spellName, _, _, _, spellDuration, _, spellCaster, _, _, spellId = UnitAura(self.unit, i, filter);
        if not spellName then break end
        if name == spellName and caster == spellCaster and duration == spellDuration then
            if (caster and whitelist[spellId] == spellCaster) or whitelist[spellId] == "all" then
                return true
            end
        end
    end
    return false
end
local f = CreateFrame("Frame")
f:RegisterEvent("NAME_PLATE_UNIT_ADDED")
f:SetScript("OnEvent", function(_,_,unitId)
    C_NamePlate.GetNamePlateForUnit(unitId).UnitFrame.BuffFrame.ShouldShowBuff = newShouldShowBuff
end)
for _,baseFrame in pairs(C_NamePlate.GetNamePlates()) do
    baseFrame.UnitFrame.BuffFrame.ShouldShowBuff = newShouldShowBuff
end

I think it may have something to do with this, but I don’t know: