"Choose a Plan" broken dialog when no paid plans are configured

I had a similar question, and was able to make it work with some JavaScript code.

If anyone is facing the same problem, please see my post with the solution here: How to hide the broken dialog when no plans are configured