This line:
https://github.com/kandji-inc/support/blob/f14e634985ca25317823190a65e41c9210f7254b/Scripts/removeGuestNetwork.zsh#L74C1-L74C110
Can be replaced by this line in order to work with macOS 15:
currentNetwork="$(/usr/libexec/PlistBuddy -c 'Print :0:_items:0:spairport_airport_interfaces:0:spairport_current_network_information:_name' /dev/stdin <<< "$(system_profiler SPAirPortDataType -xml)" 2> /dev/null)"