Question

Access data fields that have dynamic names

  • 11 August 2022
  • 1 reply
  • 39 views

Userlevel 1

I’m using the WooCommerce action that triggers when there is a new order. I need to access data from 

a field that changes each time. The field name is structured in a way that i know what the key would be… its essentially test plus one other variable (product ID) that i get with the output.

Is there a way to do this?

This is what the output looks like in the test

 

This is what it looks like when you are selecting

 


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

1 reply

Userlevel 7
Badge +12

Hi @jahardman!

This is a tricky one and I’m not sure that there’s a way to do this, but there might be. Is there a fixed number of product IDs? ie you know that the order will be one of 10 different product IDs and somewhere else in the order there’s a field that will tell you which product ID is going to be in that field? If the answer to both of those is yes then I may have a solution 😅

Also, I’m not going to lie, this is going to be technical and probably require a bit of trial and error to get right, so please bear that in mind!