• Howdy, hoping all is well.
    I have some basic PHP knowledge such as accessing arrays, inserting into the database, concatenating, ect and was wondering if there is an action hook for reactions?

    WordPress comments for example has an action hook that fires immediately after a comment is made which you can send the data off to where you need it:
    https://developer.www.ads-software.com/reference/hooks/comment_post/#comment-5362

    A sample of how the action hook could look like:

    function send_reaction( $reaction_id, $reaction_type, $reaction_author, $reaction_link ) {
    $reaction = get_reaction( $reaction_id );
    $mail = ‘[email protected]’;
    $reaction_link = get_reaction( $reaction_link )
    $subject = sprintf( ‘New reaction by: %s’, $reaction->reaction_author );
    $message = “You have a new ” . $reaction->reaction_type . “at” . $reaction_link;
    wp_mail( $mail, $subject, $message );

    }
    add_action( ‘da_reaction’, ‘send_reaction’, 10, 2 );

    Ultimately I’m interested in 3 pieces of information being sent into a database record. Reaction type, author, and the link where the reaction happened. Having this would be a dream come true as it would allow me to send notifications for reactions.

    Warm regards,

    Josh

Viewing 1 replies (of 1 total)
  • Plugin Author Daniele Alessandra

    (@danielealessandra)

    Hi Josh,

    Thank you for reaching out—hope you’re doing great!

    It’s awesome that you’re diving into customizations with PHP. Regarding your question, I’m happy to share that there is indeed an action hook available for reactions, very similar to the comment_post action in WordPress. This allows you to capture details like the reaction type, author, and link where the reaction occurred.

    However, this specific feature is part of an enhanced version of the plugin designed to support more advanced use cases. You can explore the full list of available hooks and documentation here: https://da-plugins.helpscoutdocs.com/category/62-actions.

    If you’d like more information or assistance in setting it up, feel free to let me know—I’d be happy to help.

    Warm regards,

    Daniele

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.