• Resolved gilpalma

    (@gilpalma)


    Hello and thanks in advance for your time.

    I’ve been trying to use this plugin to send some data to a user’s browser when a new post is created. I’m not entirely sure this is within the plugin’s capabilities but it certainly does seem like it would be.

    The email functionality works well, after installing an SMTP plugin, but I can’t get any results from the webhook portion. After creating a notification using the ‘New Post’ trigger and linking it to my new website’s URL, I get no new data in the devtools of my browser. As I understand it, a request should be showing there but maybe I’m missing some information or maybe I’m just misinformed. I’ve tried using a custom trigger and some HTTP requests but still haven’t had any success. The custom trigger *does* execute, since error_log()’s do print out some results, but no information seems to be passed along during all my attempts with POST requests.

    The issue may not even be with the plugin itself but your documentation does not help me understand what may be missing.

    I should add that my website only exists in my own Windows dev machine right now being served by IIS. It’s barebones, having only installed ACF Pro, Classic Editor, WP Mail SMTP, WPML (and string translation) alongside this plugin and only a single, mostly empty page on my custom theme based on the default 2017 WP theme.

    This problem may sound very silly but I’ve never done this before and may be looking in the wrong direction. If this isn’t the right way, I may have to look into some sort of subscribe/publish tech to accomplish this notification system I need. Hopefully you can point me in the right direction!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kuba Mikita

    (@kubitomakita)

    Hi,

    you are missing the most crucial part of the system. Something which will catch your webhook.

    Right now if you send a webhook to your website it probably responds with 200 and some content, that’s it. You have to have a listener for such requests which will handle them and display for the user.

    You could cut this down and develop custom notification type which will just display the data to the user. Best to use sockets but simple WordPress Heartbeat API should do fine as well. But it will probably kill your server if you have a high traffic website.

    In other words – it’s not possible with the core plugin to do what you want. You are missing a lot of code.

    Thread Starter gilpalma

    (@gilpalma)

    Alright, that’s mostly what I needed to know. I’ll look into using websockets and combining them with the custom trigger I made. At least now I’m sure I’m not going in the completely wrong direction.
    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Need help with Webhook functionality’ is closed to new replies.