• Resolved kgatan

    (@kgatan)


    I’m trying to disable a “product.updated” hook before running a product sync job but cant change the hook status using the api.

    All other writable webhook fields work as expected.

    $woocommerce = new Client(
        'https://url.com',
        'key',
        'secret',
        [
            'wp_api' => true,
            'version' => 'wc/v2',
        ]
    );
    
    try{
      $data = [
        'status' => 'disabled'
      ];
      print_r($woocommerce->put('webhooks/5', $data));
    }catch (HttpClientException $e) {
        print_r($e);
    }

    Is there some other mechanic that locks the webhook for status updates?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Rest API Webook status’ is closed to new replies.