• Resolved thunderstruckk

    (@thunderstruckk)


    I have read all possible documentation and I got lost in what’s deprecated and what’s not. Anyway, I tried all options and none of them worked:
    $woocommerce->post(..); – Fatal error, unknown method post
    $woocommerce->webhooks->create($data); – Call to a member function create() on null
    $webhook->new WC_Webhook(); , then setting all info and at the end $webhook->save(); – doesn’t work too

    Maybe I should try with the regular wp_remote_request but I couldn’t find any info on how to connect it with the hooks.

    Any help would be appreciated. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thomas Shellberg

    (@shellbeezy)

    Automattic Happiness Engineer

    @thunderstruckk – a webhook is designed to fire an external request from your site to another when a certain WooCommerce action is performed, thus, you shouldn’t need to specify the details of how it’s sent.

    Perhaps you’re trying to use the REST API instead?

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to send a webhook with a post request?’ is closed to new replies.