Hi @m401
The article you have linked to was written before ACF conditional logic was added to the code.
What version of ACF are you using?
I would recommend upgrading to a version of ACF which contains conditional logic functionality and removing your custom code.
Thanks
E