Liquid code runs only on the Shopify servers. When people change selectors on your product page theme Javascript updates your page to reflect those changes.
Theme JS has no idea that it needs to update your text. You’d need to have your own JS to do it.
This would be different for different themes.
Say, for Dawn I’d be doing something like, but this should be a “Custom liquid” block under Product Information section, not a separate section.
I tried to adopt the solution, but I can’t access the new metafields value when the selected option has changed.
The critical line is:
var variant_specs= “{{ variant.metafields[‘custom’][‘variant_specs’] }}”;
This should contain the value of the newly selected variant. But it doesn’t work. It still needs a manual refresh to update the Custom Liquid’s content. Any ideas? Thank you!