Support » Plugin: WooCommerce » product.update webhook not fired when variation meta is edited

  • Resolved Paul

    (@paulka)


    Hi team,

    (I’m a bit of a noob so please excuse.)

    I’ve got my integromat automation working quite well, the webhook for edited products fires and starts a lookup to get the meta info.

    However if I edit the (‘_wcj_purchase_price’) meta data of a variation and save, it does not fire for the variation, instead it fires for the parent product only. The only way to get it to fire is the edit one of the main fields like price sku etc. of the variation, (but generally we don’t want to edit those, we only want to change some meta_data fields.) It doesn’t need to fire for all variations, only the ones I edit, and it does work if we edit one of the main fields, then the variation product ID is sent in the webhook payload as expected.

    Does it ignore changed metadata when saving to see if it should trigger the webhook? Should I add a custom hook to trigger the product.updated webhook for specific meta data fields?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hi @paulka,

    That’s an interesting situation. I wasn’t able to duplicate that with the built-in meta fields. For example, if I change the variation dimensions, it does fire the product updated webhook when I update the product.

    product

    I tested using webhook.site to receive the fired webhook. Try setting up a test webhook there and see if any of the built-in fields will trigger it. If they do work, then perhaps there is something with how the meta field is added to the product.

    Let us know what you find out.

    Thanks!

    Thread Starter Paul

    (@paulka)

    Hi @3sonsdevelopment Thanks!
    What if you tried using the woocommerce ‘cost of goods’ plugin and updated the price of goods, would the webhook get fired?

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @paulka,

    That’s an excellent question. Since that’s a question about a premium extension, the best thing to do would be to reach out to the developers directly for help with it. We’re not able to provide support for the premium extensions here in the forums.

    You can open up a ticket here.

    https://woocommerce.com/my-account/create-a-ticket/

    Make sure to select “Cost of Goods” as the extension and the form will get you in touch with the right team.

    Thanks!

    Thread Starter Paul

    (@paulka)

    Hey @3sonsdevelopment

    Thanks again for your reply. However, it’s not specifically with Cost of goods, I don’t even use that plugin just thought it might be a similar use-case.

    However if you edit any non-built-in meta does the webhook fire for the variation?

    I also tested the product dimensions and the variation does send the correct webhook, but not when I edit a custom meta field.

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hi @paulka,

    Thanks for the clarification. I did go on and test the webhook with Cost of Goods on a variation and it did fire for me. At least with that extension, the custom meta did trigger the webhook.

    I hope that helps out.

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hello @paulka,

    It’s been a while since we heard from you, so I’m marking this thread resolved. Hopefully, you’ve been able to resolve this, but if you haven’t, please let open up a new topic and we’ll be happy to help out.

    Cheers

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘product.update webhook not fired when variation meta is edited’ is closed to new replies.