Is there a hook to check what a user posted a listing?

Greetings,
is there a hook to check what a user posted a listing?

I tried with “hivepress/v1/models/post/create”, but it doesn’t work.

Thank you
Greetings

Hi,

Please try to use this hook hivepress/v1/forms/listing_update. In this function, you can check, for example, whether the status has changed from pending to publish.
Also, please check these links:

​I hope this is helpful to you.

Hi, thanks for the reply.

I’ll explain,
I would like to activate my function AFTER a user has created or updated a listing.

with these two action
hivepress/v1/models/listing/create
hivepress/v1/models/listing/update
i think i can do what i want!

with precision I have to intercept a field value added with hivepress/v1/forms/listing_update

it’s possible?

alternatively, how can I intercept the value of a form field, after creation or update listing?

Thanks again

You can try using this hook to detect the form submission (set the low priority so the callback is fired after all the other ones):

hivepress/v1/forms/listing_update/errors

It’s a filter hook for the form validation errors, you can check if the error array is empty and use the form field values.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.