WooCommerce Trigger, How to get the product id/variable ID of an product?

Answered
0
0

Hello,
As title said so I have

Trigger: WooCommerce order status changed
Action: Send Slack Message
Description:
PRODUCT INFO: {TRIGGER[items][0][item_meta][_product_id][0]} and {TRIGGER[items][0][item_meta][_variation_id][0]}

The Slack message can be sent successfully but there’s no value at all, what I am trying to do is to find out what is the product id or variation id

Anyone know how to do that?

  • You must to post comments
Best Answer
0
0

The bug has been fixed and the structure of the WooCommerce variables has been updated. Please install the latest version (1.7). Starting this version you can use these variables: https://jetflow.io/automate/workflow-variables/woocommerce-fields/

Here are variables you can use in your workflow:

For the first item in an order:

{TRIGGER.items.0.product_id}
{TRIGGER.items.0.variation_id}

For the second one:

{TRIGGER.items.1.product_id}
{TRIGGER.items.1.product_id}

Note that {TRIGGER.items} is a list of items in the order and I recommend generating an HTML view of all items in an order with the “Format list” action: https://jetflow.io/automate/workflow-actions/format-list/
or the “Format list as table” action: https://jetflow.io/automate/workflow-actions/format-list-as-table/

  • You must to post comments
0
0

The issue is caused by a bug you just found. I’m sorry about the issue. A new version of the plugin will be released soon.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.