• Resolved roperjonathan

    (@roperjonathan)


    I’m having a very weird issue with my shop where every hour or so, random empty product variants are being added to my products.

    In my database, it seems to be making two rows everytime a variant is added. Please note I have removed any identifying information

    The first row is the product being added which looks similar to this

    (60873, 5, ‘2019-11-05 15:02:14’, ‘2019-11-05 15:02:14’, ”, ‘Name Of Product’, ”, ‘trash’, ‘closed’, ‘closed’, ”, ‘product-330’, ”, ”, ‘2019-11-05 15:02:14’, ‘2019-11-05 15:02:14’, ”, 1308, ‘https://lashis.co.uk/?post_type=product_variation&p=60873’, 177, ‘product_variation’, ”, 0),

    The second row is then a webhook which fires to TradeGecko which looks like this.

    (60874, 0, ‘2019-11-05 15:02:15’, ‘2019-11-05 15:02:15’, ‘{\”webhook_id\”:12,\”arg\”:60873}’, ‘woocommerce_deliver_webhook_async’, ”, ‘publish’, ‘open’, ‘closed’, ”, ‘scheduled-action-5dc18fadea7866.06156584-9UG9mRCYfzUWhQBibyyd6Gf58s5Cb9RX’, ”, ”, ‘2019-11-05 15:05:17’, ‘2019-11-05 15:05:17’, ”, 0, ‘https://website.co.uk/?post_type=scheduled-action&p=60874’, 0, ‘scheduled-action’, ”, 1),

    I have some questions

    1. Can a webhook allow a product to be created or does the product have to be created first before the webhook can fire?
    2. Is there a way of finding out what code created a Post ID?

    • This topic was modified 6 years, 7 months ago by roperjonathan.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Phil

    (@fullysupportedphil)

    Automattic Happiness Engineer

    Hey @roperjonathan

    1. A webhook is meant to provide information to an destination outside of your website. They trigger after an action takes place on your site, they don’t perform actions on your site. So a webhook would not be able to create new products on your website.

    That could be done with an API call. It’s possible that a webhook is informing a third-party platform of something and that platform is then firing an API call to create something on your site.

    2. You would need to set up debug logging in WordPress and then review the logs that you get there. Even that may not be able to specifically show what is triggering an action on your site though.

    If you have a problem that you can replicate, I would recommend doing conflict testing to see if you can isolate a plugin/theme or API integration causing the problem. We have a guide on how to test for conflicts here:
    https://docs.woocommerce.com/document/woocommerce-self-service-guide/#section-4

    Hope that helps!

    laceyrod

    (@laceyrod)

    Automattic Happiness Engineer

    This thread has been inactive for a bit, so I’m going to mark it as Resolved now. Please feel free to open a new one if you have any further questions.

    Cheers!

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

The topic ‘Automatically Creating Product Variants’ is closed to new replies.