da_r_before_insert_user_reaction

Location

DaReactions\Data::insertUserReaction

Triggered before inserting a new reaction by a user.

Parameters:

  • $item_id  (int|string): The ID of the item.
  • $item_type  (string): The type of the item.
  • $reaction  (string): The reaction being added.

Example:

add_action('da_r_before_insert_user_reaction', function($item_id, $item_type, $reaction) {
    error_log("User is adding reaction '$reaction' to item $item_id of type $item_type.");
});

Use Case:

Validate the reaction or notify administrators before insertion.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us