Hook into log insertion to send custom events
-
Hello, I’m trying to hook into log insert so I can set discord messages via webhook.
I have my own custom events I want to catch, as well as default ones.
So far I used
add_action( 'simple_history/log/inserted')
hook to trigger sending messages, but so far I encountered two problems:1: Events that are not triggered by any user (system and custom cron events) seem to not trigger that action
2: How do I get already parsed message that is inserted into plugin?more on #2: when post is updated, I’m catching array of post title, old and new content etc, but how do I get actual parsed message like “Updated post ‘Title of the post'” message?
- The topic ‘Hook into log insertion to send custom events’ is closed to new replies.