Title: Webhook &#8211; problem
Last modified: March 17, 2021

---

# Webhook – problem

 *  Resolved [francescobarbato](https://wordpress.org/support/users/francescobarbato/)
 * (@francescobarbato)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/webhook-problem/)
 * Hi, needing to update the warehouse of an external database, I created a webhook
   to a php script.
 * However, I cannot extrapolate the data of the “line_items” array, following your
   tree as per attachment.
    [https://www.dropbox.com/s/qkau5oa307tk5jg/Schermata%202021-03-17%20alle%2015.56.33.png?dl=0](https://www.dropbox.com/s/qkau5oa307tk5jg/Schermata%202021-03-17%20alle%2015.56.33.png?dl=0)
 * I do a for loop like this but the data is not returned:
 * $ data = file_get_contents (“php: // input”);
    $ events = json_decode ($ data,
   true);
 * foreach ($ events [‘line_items’] [0] [‘sku’] as $ array_result) {
 *  echo $ array_result;
 * }
 * What am I doing wrong?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwebhook-problem%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Gabriel – a11n](https://wordpress.org/support/users/gabrielfuentes/)
 * (@gabrielfuentes)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/webhook-problem/#post-14196258)
 * Hi there!
 * This is a fairly complex development topic. I’m going to leave it open for a 
   bit to see if anyone is able to chime in to help you out.
 * I can also recommend [the WooCommerce Developer Resources Portal](https://developer.woocommerce.com/)
   for resources on developing for WooCommerce.
 * You can also visit the [WooCommerce Facebook group](https://www.facebook.com/groups/advanced.woocommerce/)
   or the `#developers` channel of the [WooCommerce Community Slack](https://woocommerce.com/community-slack/).
   We’re lucky to have a great community of open-source developers for WooCommerce,
   and many of our developers hang out there, as well.
 * Cheers!
 *  [laceyrod](https://wordpress.org/support/users/laceyrod/)
 * (@laceyrod)
 * Automattic Happiness Engineer
 * [5 years, 1 month ago](https://wordpress.org/support/topic/webhook-problem/#post-14230223)
 * Hi [@francescobarbato](https://wordpress.org/support/users/francescobarbato/)–
 * This thread has been inactive for a bit, so I’m going to mark it as `Resolved`
   now for the overall health of the forums. Please check out the resources we listed
   above for additional assistance, and you can also look into hiring paid support
   with our experts here: [https://woocommerce.com/customizations/](https://woocommerce.com/customizations/)
 * Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Webhook – problem’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [laceyrod](https://wordpress.org/support/users/laceyrod/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/webhook-problem/#post-14230223)
 * Status: resolved