The theme code, frankly, looks inconsistent, but, you should go to your theme assets, open each of the files I mentioned (product-media.js, product-media-mobile.js andvariant-picker.js, maybe product-card-swatch.js if you use swatches), search for function getProductJson, and replace it with the code I’ve provided.
It’s possible that the file is minified (looks like one long line of code), then it would be a bit more complex, I’d recommend enlisting someone to help you, preferably theme developers…