Is it possible to remove product tags that contains a certain text?

Is it possible to remove product tags that contains a certain text?

raqui
Tourist
6 0 1

Right now, we have a Flow set up to notify us when a transfer comes in for certain products, but I'd like to push the automation a little further by removing tags.

 

The only problem is the tags I'd like to remove all have different text, and I need Flow to remove tags that have the text "EDD:" on it. Is this even possible? If it isn't, any suggestions for workarounds?

Replies 3 (3)

Jason
Shopify Partner
11206 226 2314

Is it possible for you to share the flow so far? I get that you might not want to given it could reveal some secrets or back end processes. In that case it would still be handy to get a few bullet points on the general flow so members could look to replicate locally and test a possible approach.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
raqui
Tourist
6 0 1

Hi @Jason! Thanks for your reply

 

So the “EDD:” tags control a feature on our theme that I coded to display “Estimated Date of Delivery”.

 

So right now the Flow I’ve set up notifies us via email when inventory changes from 0- to 1+, and when the inventory policy for any of that product’s variants are set to CONTINUE. But aside from notifying us via email, I’d like for it to also automatically remove the EDD tags, so we don’t have to think about it anymore.

 

For reference, the EDD tags look like:

 

EDD: February 2022

EDD: December 2021

EDD: January 2022

 

So I was wondering if there’s a way to modify the action “Remove Product Tags” to remove tags that contain the phrase “EDD”

 

Is it possible?

Appsalon-Norway
Shopify Partner
1 0 1

This is an old post but hopefully answering this can help someone else 🙂
You can use this in the "Remove Product Tags" as a tag:
{% for tags_item in product.tags %}{% if tags_item contains 'EDD:' %}{{ tags_item }}{% endif %}{% endfor %}