| @@ -3,10 +3,11 @@ | ||
| 3 | 3 | namespace Give\Revenue; |
| 4 | 4 | |
| 5 | 5 | use Give\Framework\Migrations\MigrationsRegister; |
| 6 | 6 | use Give\Helpers\Hooks; |
| 7 | +use Give\Revenue\Listeners\DeleteRevenueWhenDonationPostDeleted; | |
| 7 | 8 | use Give\Revenue\Listeners\DeleteRevenueWhenDonationDeleted; |
| 8 | -use Give\Revenue\Listeners\UpdateRevenueWhenDonationAmountUpdated; | |
| 9 | +use Give\Revenue\Listeners\UpdateRevenueWhenDonationUpdated; | |
| 9 | 10 | use Give\Revenue\Migrations\AddPastDonationsToRevenueTable; |
| 10 | 11 | use Give\Revenue\Migrations\CreateRevenueTable; |
| 11 | 12 | use Give\Revenue\Migrations\RemoveRevenueForeignKeys; |
| 12 | 13 | use Give\ServiceProviders\ServiceProvider; |
| @@ -27,8 +28,10 @@ | ||
| 27 | 28 | |
| 28 | 29 | /** |
| 29 | 30 | * @inheritDoc |
| 30 | 31 | * |
| 32 | + * @since 4.14.0 rename delete_post handler to DeleteRevenueWhenDonationPostDeleted and add givewp_donation_deleted listener | |
| 33 | + * @since 3.3.0 added support for givewp_donation_updated and updated give_updated_edited_donation implementation | |
| 31 | 34 | * @since 2.9.0 |
| 32 | 35 | */ |
| 33 | 36 | public function boot() |
| 34 | 37 | { |
| @@ -33,12 +36,14 @@ | ||
| 33 | 36 | public function boot() |
| 34 | 37 | { |
| 35 | 38 | $this->registerMigrations(); |
| 36 | 39 | |
| 37 | - Hooks::addAction('delete_post', DeleteRevenueWhenDonationDeleted::class, '__invoke', 10, 1); | |
| 40 | + Hooks::addAction('delete_post', DeleteRevenueWhenDonationPostDeleted::class); | |
| 41 | + Hooks::addAction('givewp_donation_deleted', DeleteRevenueWhenDonationDeleted::class); | |
| 38 | 42 | Hooks::addAction('give_insert_payment', DonationHandler::class, 'handle', 999, 1); |
| 39 | 43 | Hooks::addAction('give_register_updates', AddPastDonationsToRevenueTable::class, 'register', 10, 1); |
| 40 | - Hooks::addAction('give_updated_edited_donation', UpdateRevenueWhenDonationAmountUpdated::class); | |
| 44 | + Hooks::addAction('givewp_donation_updated', UpdateRevenueWhenDonationUpdated::class); | |
| 45 | + Hooks::addAction('give_updated_edited_donation',LegacyListeners\UpdateRevenueWhenDonationAmountUpdated::class); | |
| 41 | 46 | } |
| 42 | 47 | |
| 43 | 48 | /** |
| 44 | 49 | * Registers database migrations with the MigrationsRunner |