Table Of Contents

Action: group created

Table Of Contents
Hook
peepso_action_group_create

 

Plugin PeepSo Groups
Since 1.7.0
Status Active
Args
PeepSoGroup

Description #

Fires after a new PeepSoGroup is created, passes the PeepSoGroup object

Examples #

1 2 3 4 5 6 7 8
// Send an email when a group is created

add_action('peepso_action_group_create', function(PeepSoGroup $PeepSoGroup) {
    $subject = "New group {$PeepSoGroup->get('name')} ID {$PeepSoGroup->get('id')}";
    $message = "Hi,\n\n this email is just to let you a new group {$PeepSoGroup->get('name')} with ID {$PeepSoGroup->get('id')} was created.\n\nHave a nice day!";
 
    mail('admin@example.com', $subject ,$message);
}, 10, 1);

What are your feelings
Updated on Sep 22, 2023