Best answer

How can I split WooCommerce line items based on quantity and type without nested loops?

  • 8 February 2023
  • 2 replies

Userlevel 1

I have a Zap that pushes line items from WooCommerce using a loop.
I need another line item based on quantity.

So for example if the order is:

  • Blue x1
  • Green x2

I need the Zap to push the following:

  • Blue x1
  • Green x1
  • Green x1

Zapier doesn’t allow nested loops.

Can anybody think of a way to split the line items based on both quantity and type?


Best answer by Troy Tessalone 8 February 2023, 17:06

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +14

Hi @Matthewzap 

Good question.

Some options:

  1. Use Code step to prep the line item data before passing it to the Loop
  2. Chain Zaps together with Webhooks:


Userlevel 1

I was thinking something along code, but I think I was overthinking it.

Now that I am rethinking it, it doesn’t have to be that complex.

I do like daisy chaining the Zaps. Something I guess I should be doing anyways. 
I’ll look into both.