Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi,
in the theme I'm using, I have the option to display badges that are added via a metafield named custom.badges. The type of this metafield is list.single_line_text_field. In Shopify Flow, I would like a "new" badge to be added to newly added products, and then after 30 days, remove the value of this metafield, which is "new", without removing the metafield itself, because it may contain other values, like "bestseller".
I can only replace the "new" value with another one, but I just want to remove it. I can update the value by adding an array [ "badge1", "badge2" ], but I'm unable to remove a specific value.
Best regards
This might be easier if you use the Run code action. Here's an example of how you can build a list: https://github.com/Shopify/flow-code-examples/tree/main/run-code-examples/product-tags-to-metafields
Otherwise, you'll need to use Liquid to remove "badge1" from that list. That will be tricky because you also have to handle commas/brackets/etc.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024