[Documentation](https://groundhogg.io/documentation/) » [Action Hooks](https://groundhogg.io/documentation/#doc-action-hooks)

# groundhogg/contact/agreed_to_terms

Published Tuesday, June 9, 2026 · Last updated Tuesday, June 9, 2026

Fires when a contact agrees to the site’s terms and conditions. Use this to record consent in a compliance system.

```

do_action( 'groundhogg/contact/agreed_to_terms', $contact );
```

You will receive the `Contact` object.

## Example

```

add_action( 'groundhogg/contact/agreed_to_terms', 'my_extension_log_terms_consent' );

/**
 * Record terms acceptance in a custom audit log.
 *
 * @param \Groundhogg\Contact $contact
 *
 * @return void
 */
function my_extension_log_terms_consent( $contact ) {
    my_extension_audit_log( [
        'event'      => 'terms_agreed',
        'contact_id' => $contact->get_id(),
        'email'      => $contact->get_email(),
        'timestamp'  => current_time( 'mysql' ),
        'ip'         => $contact->get_ip_address(),
    ] );
}
```
