Disable Shopify Add to Cart button based on metafield value

I have a boolean variant metafield which when set to “True” on a variant, and this variant is selected, changes the price element to a placeholder text showing “POA”. I would also like the “Add to Cart” button to be disabled when this happens too, but that part I am struggling with. I have managed to achieve this when the page loads to the variant with the metafield set to true, but not when its selected after the page load and I guess that is where Javascript comes in. I am fairly comfortable with liquid/html coding but not Javascript. I have amended some to get the price to change. It’s a 2.0 theme from the Shopify store called “Stockmart”.

I have tried to look at the Javascript files and can see the Javascript code that disables the “Add to cart” button currently, but this is based on the product inventory settings so can’t directly utilise that I guess.

Thank you.