# give/4.16.8.1/src/Framework/Migrations/Actions/Notices.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.8.1. 43 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.8.1/code/src/Framework/Migrations/Actions/Notices.php
- Raw: https://pluginprobe.com/plugins/give/4.16.8.1/raw/src/Framework/Migrations/Actions/Notices.php
- Modified: 2025-05-21T20:18:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.8.1/code/src/Framework/Migrations/Actions/Notices.php#L10-L20`.

```php
<?php

namespace Give\Framework\Migrations\Actions;

use Give\Framework\Migrations\MigrationsRegister;
use Give\MigrationLog\MigrationLogRepository;
use Give\MigrationLog\MigrationLogStatus;

/**
 * @since 4.3.0
 *
 * Show reversed migration notice
 */
class Notices
{
    public function __invoke()
    {
        $migrations = give(MigrationLogRepository::class)->getMigrationsByStatus(MigrationLogStatus::REVERSED);

        foreach ($migrations as $migration) {
            $migrationClass = give(MigrationsRegister::class)->getMigration($migration->getId());

            $listTableLink = sprintf(
                '<a href="%s">%s</a>',
                admin_url('edit.php?post_type=give_forms&page=give-tools&tab=data'),
                esc_html__('Run update', 'give')
            );

            give()->notices->register_notice(
                [
                    'id' => $migration->getId(),
                    'type' => 'warning',
                    'description' => sprintf(
                        __('<strong>GiveWP</strong> Pending database update: "%s". %s', 'give'),
                        $migrationClass::title(),
                        $listTableLink
                    ),
                ]
            );
        }
    }
}

```
