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