true ) ); } \AfroIT\Messaging\WorkflowAutomations\Infrastructure\Autoloader::register(); $schema = new \AfroIT\Messaging\WorkflowAutomations\Infrastructure\DatabaseSchema(); $schema->maybeUpgrade(); update_option( 'afromewo_activation_redirect', 1 ); } register_activation_hook( __FILE__, 'afromewo_activate' ); /** * Clear scheduled events when the plugin is deactivated. * * @return void */ function afromewo_deactivate() { $scheduled_hooks = array( 'afromewo_process_abandoned_carts', 'afromewo_process_events_queue', 'afromewo_process_local_executions', 'afromewo_process_local_executions_now', ); foreach ( $scheduled_hooks as $hook ) { wp_clear_scheduled_hook( $hook ); } } register_deactivation_hook( __FILE__, 'afromewo_deactivate' ); function afromewo_flash_transient( $transient_name ) { $transient = get_transient( $transient_name ); if ( $transient ) { delete_transient( $transient_name ); return $transient; } return null; } /** * Bootstrap. */ function afromewo_bootstrap() { return \AfroIT\Messaging\WorkflowAutomations\Plugin::instance(); } afromewo_bootstrap();