Widget checkbox array empty on update function

I suspect this is mostly happening because down towards the bottom, you’ve got an input that’s not using $this->get_field_name() (the first of the two checkbox inputs).

Try using $this->get_field_name() as you did in the “then” clause of that section of code and it should be OK.

Not much else wrong that I can see.