PageFactory.php
4 years ago
PageSeedCommand.php
4 years ago
RecurringDonationFactory.php
4 years ago
RecurringDonationRepository.php
4 years ago
RecurringDonations.php
4 years ago
ServiceProvider.php
4 years ago
ServiceProvider.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\TestData\Addons\RecurringDonations; |
| 4 | |
| 5 | use Give\Helpers\Hooks; |
| 6 | use Give\ServiceProviders\ServiceProvider as GiveServiceProvider; |
| 7 | use WP_CLI; |
| 8 | |
| 9 | /** |
| 10 | * Class ServiceProvider |
| 11 | * @package Give\TestData\RecurringDonations |
| 12 | */ |
| 13 | class ServiceProvider implements GiveServiceProvider |
| 14 | { |
| 15 | /** |
| 16 | * @inheritDoc |
| 17 | */ |
| 18 | public function register() |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * @inheritDoc |
| 24 | */ |
| 25 | public function boot() |
| 26 | { |
| 27 | if (defined('WP_CLI') && WP_CLI) { |
| 28 | WP_CLI::add_command('give test-recurring-demonstration-page', give()->make(PageSeedCommand::class)); |
| 29 | } |
| 30 | // Update donation meta on donation insert |
| 31 | Hooks::addAction('give-test-data-insert-donation', RecurringDonations::class, 'insertRecurringDonation', 10, 2); |
| 32 | } |
| 33 | } |
| 34 |