How to disable the “Require users to update the client” setting programmatically?

There’s a similar issue here, have you seen this post? It may be worth checking through your code to see if the lines mentioned are included.