mitcho / hookpress

HookPress
58 stars 57 forks source link

Category Details in Hook Body #18

Open royzer opened 7 years ago

royzer commented 7 years ago

Hi,

Thanks for this plugin - I can now extend Wordpress for my requirement.

I seems to have one problem though - I have created 3 webhooks for create, edit & delete categories (create_category, edit_category, delete_category). The webhooks are fired correctly - but the data inside the Body seems to have only the hook name. Other details are missing. I tried selecting all fields/few fields/ID field alone for the webhook - nothing seem to work.

Request bin link to view the payload : http://requestb.in/ryja6wry?inspect

Also, attaching the screenshot of the hook, for reference.

hookpress_category

Would be great if I could get any help on this. Even if I get the category ID, that would be fine.

mikemenard commented 7 years ago

Same issue. Have you find a solution?

mikemenard commented 7 years ago

I have found the problems. The hook have change. U need to use created{$taxonomy} and edited{$taxonomy}. Like created_category or created_post_tag