Remove elements from a list
This workflow action makes a copy of the specified list and removes elements with the specified keys. The resulting list is available in the next action with the variable {PREVIOUS}
. To make it available throughout the rest of the actions in the workflow, use Push results to a list. In the example below, we define the custom list {ORDER_FILTERED}
.
You can specify any kind of keys; numerical or string. For instance, to delete the first element in a numerically indexed list, use zero key 0
. To delete elements from a multidimensional list, you can specify keys by using dot notation. For instance, to delete customer metadata from the list generated by the WooCommerce new order trigger, use customer.meta
.
To take an opposite action and add elements to a list, use the Add elements to a list action.