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

# groundhogg/activated

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

Fires just after a Groundhogg plugin or extension has been activated and its installer has run. Use this to set up default options or seed data on first activation.

```

do_action( 'groundhogg/activated', $installer_name );
```

You will receive the installer slug as a string.

## Example

```

add_action( 'groundhogg/activated', 'my_extension_on_activated' );

/**
 * Seed default settings when the extension is activated.
 *
 * @param string $installer_name
 *
 * @return void
 */
function my_extension_on_activated( $installer_name ) {
    if ( $installer_name !== 'my-extension' ) {
        return;
    }

    add_option( 'my_extension_version', MY_EXTENSION_VERSION );
    add_option( 'my_extension_installed', time() );
}
```
