AffiliateWPIntegration.php
3 years ago
AffiliateWPService.php
4 years ago
AffiliateWPServiceProvider.php
4 years ago
AffiliateWPService.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Integrations\AffiliateWP; |
| 4 | |
| 5 | use Surecart\Integrations\AffiliateWP\AffiliateWPIntegration; |
| 6 | |
| 7 | /** |
| 8 | * Controls the LearnDash integration. |
| 9 | */ |
| 10 | class AffiliateWPService { |
| 11 | /** |
| 12 | * Bootstrap the integration. |
| 13 | * |
| 14 | * @return void |
| 15 | */ |
| 16 | public function bootstrap() { |
| 17 | add_filter( 'affwp_extended_integrations', [ $this, 'register' ] ); |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Register the integration |
| 22 | * |
| 23 | * @param array $integrations Integrations. |
| 24 | * |
| 25 | * @return array |
| 26 | */ |
| 27 | public function register( $integrations ) { |
| 28 | $integrations['surecart'] = [ |
| 29 | 'name' => __( 'SureCart', 'surecart' ), |
| 30 | 'class' => AffiliateWPIntegration::class, |
| 31 | 'file' => dirname( __FILE__ ) . '/AffiliateWPIntegration.php', |
| 32 | 'supports' => [ 'sales_reporting' ], |
| 33 | ]; |
| 34 | return $integrations; |
| 35 | } |
| 36 | } |
| 37 |