I don’t think it should trigger multiple times. The code will only remove a tag with a failed status if the new status is different. So if the old status of the order was ‘Failed’ and the new status is ‘Failed’ then the tag will not be deleted and recreated. It will just be synchronised – which I am pretty sure is not treated as a tag being added by ActiveCampaign.
The other question is whether WooCommerce changes the status during the subsequent attempt. I don’t think so but I don’t have the test data to confirm i.e. does the status go from ‘Failed’ to ‘Pending’ to ‘Failed’ (I don’t think WC does this but I’m not certain in all situations).
You could set the automation to only be triggered once to be on the safe side.
If you do see the event (multiple declined payment failures) again and it does not behave as I expected then please let me know.
Regards,
Matthew
ok thanks mate!
Also, any chance we can link a new order to a specific form (ID) in Active Campaign?
THank way, on purchase, I can trigger the optin for a specific form so they can click the button and actually opt in to the list?
I’ll make a note to look at that when I next do some enhancements. I don’t see why not. It is also related to another (outstanding) request for the ability to have a sign up (optin) option to a newsletter at the checkout.
As a workaround of sorts, an automation to check for specific product tags and subscribe a contact to another list might help.