All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I would like to update a product's custom metafield with its available "In Stock" option values.
Here's my use case:
If a product has size options like 20, 22, and 24 listed in the product options and available inventory for these sizes, I want to automatically reflect this data in the corresponding product metafield. This will allow me to use the metafield to display dynamic stock information elsewhere in my store.
Could someone guide me on how to achieve this?