Support » Plugin: Groups » Email Users when Group Removal Occurs

  • WCVendors


    We use WooCommerce Groups and Groups to add buyers to a 12 month product that is not recurring.

    After 12 months, the user is removed from the group as it appears there are cron jobs for.

    Upon removal from the group, is there a method to send the user an email saying that their access has expired?



Viewing 1 replies (of 1 total)
  • Plugin Author Kento


    Hi Ben,

    You can use the groups_deleted_user_group action (see < href=””>Actions in the documentation for details) and implement a function which uses wp_mail to send a notification.

    Basically something based on this:

    add_action( 'groups_deleted_user_group', 'groups_deleted_user_group_20160106' );
    function groups_deleted_user_group_20160106( $user_id, $group_id ) {
        $email = ''; // @todo obtain $email from $user_id
        $subject = 'Group membership expired';
        $message = ''; // @todo provide info about what happened and how they can regain access
        wp_mail( $email, $subject, $message );


Viewing 1 replies (of 1 total)
  • The topic ‘Email Users when Group Removal Occurs’ is closed to new replies.