#[OnActivation]

Attribute on methods.

use Saij\WpAppFramework\Lifecycle\OnActivation;

Runs the method when the plugin is activated or the site switches to the theme (or child theme).

A plugin runs it in the request that activates it (activate_{plugin}); network-wide activation runs it once per site. A theme runs it on the first request after the switch (after_switch_theme), unless the previous theme was this theme or its child theme. The method is public, returns void and takes services only.