register_setting sanitize callback $input is null May 18, 2022 by Tarik Billa It turned out to be nonce related: the form didn’t have a nonce. Solved this by adding wp_nonce_field to the form.