• I am using WP Webhook and set the webhook for post_create in Send Data,when i publish a post webhook give Inherit Response in Post_Status and post_permalink is also wrong.I also check it with webhook.site.

    I got this response

    
    {
      "post_id": 1340,
      "post": {
        "ID": 1340,
        "post_author": "1",
        "post_date": "2021-01-23 08:25:04",
        "post_date_gmt": "2021-01-23 08:25:04",
        "post_content": "aboutlatest",
        "post_title": "Latest",
        "post_excerpt": "",
       <strong> "post_status": "inherit",</strong><em>
        "comment_status": "closed",
        "ping_status": "closed",
        "post_password": "",
        "post_name": "1339-revision-v1",
        "to_ping": "",
        "pinged": "",
        "post_modified": "2021-01-23 08:25:04",
        "post_modified_gmt": "2021-01-23 08:25:04",
        "post_content_filtered": "",
        <em><strong>"post_parent": 1339,</strong></em>
        "guid": "https://pay2vault.com/wp3/2021/01/23/1339-revision-v1/",
        "menu_order": 0,
        "post_type": "revision",
        "post_mime_type": "",
        "comment_count": "0",
        "filter": "raw"
      },
      "post_meta": [],
      "post_thumbnail": false,
      <strong><em>"post_permalink": "https://pay2vault.com/wp3/2021/01/23/1339-revision-v1/",</em></strong></em>
      "taxonomies": []
    }
    

    post_status should be publish
    post_parent should be 0
    post_permalink should be https://pay2vault.com/wp3/2021/01/23/latest/

    • This topic was modified 4 years, 2 months ago by shrineeraj.
    • This topic was modified 4 years, 2 months ago by Yui. Reason: please use CODE button for code formatting
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Ironikus

    (@ironikus)

    Hey @shrineeraj – thank you very much for your message, as well as for reaching out about that.
    Is it correct that you try to trigger the webhook on a post revision instead of the real post?
    I suggest checking the settings of your webhook endpoint since you can only whitelist specific post types for each of your added webhook URLs.

    Also, it’ll be great if you can share with me your exact steps of how the issue can be reproduced.
    Thank you already very much.

    Thread Starter shrineeraj

    (@shrineeraj)

    Thank for reply.

    I am just publish new post by following this step.
    Navigate to left sidebar Settings > WP Webhooks > Settings
    Activate “Send Data” Triggers
    Switch on Send Data On New Post
    Navigate to Send Data > Send Data on New Post (post_create)
    Enter Webhook Name
    Paste webhook url under Webhook URL field.

    • This reply was modified 4 years, 1 month ago by shrineeraj.
    Plugin Contributor Ironikus

    (@ironikus)

    Hey @shrineeraj – Thank you very much for your feedback.
    For further testing, it’ll be superb if you can show me as well the steps on how you create the post.
    E.g. Do you create the post via the “Add New” button, through a third-party plugin, an API, etc.?
    This way I can do the same steps to check when the trigger first and how it affects that functionality.
    Thank you already very much. ??

    Thread Starter shrineeraj

    (@shrineeraj)

    I am creating the post via “Add New” button and publishing it.This issue is generating,

    But when i create a post & publish post using API it give proper response(publish)

    Thread Starter shrineeraj

    (@shrineeraj)

    Hi @ironikus is there any solution.

    Thread Starter shrineeraj

    (@shrineeraj)

    Hi is there any solution for the issue.

    Plugin Contributor Ironikus

    (@ironikus)

    Hey @shrineeraj – Thank you for your consistency and apologies for the late reply.
    I would love to help you solve this issue and would therefore check on some more configuration topics.

    Can you tell me if you selected any specific post type to trigger this webhook on?
    You can check it this way:

    1. Go to your WordPress dashboard
    2. Settings
    3. WP Webhooks
    4. Send Data
    5. Open the webhook trigger that triggers the wrong URL
    6. Click on the settings link next to your added trigger URL
    7. Within the settings, please locate the Trigger on selected post types setting
    8. In there, make sure you have selected only the post types you would like to trigger

    The reason I’m writing the manual above is that I believe you haven’t selected any, or also the post revision as the trigger above fired on a revision, which you can avoid by selecting only the post types you want to trigger it on.

    That’s it for now. Feel free to let me know if it helps – otherwise, I will guide you further. ??

    Thread Starter shrineeraj

    (@shrineeraj)

    Thank You
    It’s working now.
    I have one more query.
    Send Data on New Post (post_create) and Send Data on Post Update (post_update)
    both webhooks give the post_status response Publish.
    how can i differentiate it
    I got post > post_date and post > post_modified field different.
    it’s okay if differentiate new and update post on the basis of this 2 dates.

    Plugin Contributor Ironikus

    (@ironikus)

    Hey @shrineeraj – Thank you for your feedback, glad to hear it works for you.
    Within the header of each request, we send over the webhook trigger type (the slug). Here’s the entity for the Send Data on Post Update and Send Data on New Post triggers:

    Send Data on Post Update:
    x-wp-webhook-name post_update

    Send Data on New Post
    x-wp-webhook-name post_create

    Feel free to let me know in case you have any further questions. ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Inherit post_status response on post_create webhook’ is closed to new replies.