DataFields
2 years ago
DataObjects
3 years ago
Triggers
3 years ago
images
3 years ago
ThriveAutomatorApp.php
3 years ago
ThriveAutomatorService.php
3 years ago
ThriveAutomatorServiceProvider.php
3 years ago
ThriveAutomatorService.php
55 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Integrations\ThriveAutomator; |
| 4 | |
| 5 | use SureCart\Integrations\ThriveAutomator\DataFields\PreviousProductDataField; |
| 6 | use SureCart\Integrations\ThriveAutomator\DataFields\PreviousProductIDDataField; |
| 7 | use SureCart\Integrations\ThriveAutomator\DataFields\PreviousProductNameField; |
| 8 | use SureCart\Integrations\ThriveAutomator\DataObjects\ProductDataObject; |
| 9 | use SureCart\Integrations\ThriveAutomator\DataFields\ProductDataField; |
| 10 | use SureCart\Integrations\ThriveAutomator\DataFields\ProductIDDataField; |
| 11 | use SureCart\Integrations\ThriveAutomator\DataFields\ProductNameDataField; |
| 12 | use SureCart\Integrations\ThriveAutomator\DataObjects\PreviousProductDataObject; |
| 13 | use SureCart\Integrations\ThriveAutomator\Triggers\PurchaseCreatedTrigger; |
| 14 | use SureCart\Integrations\ThriveAutomator\Triggers\PurchaseRevokedTrigger; |
| 15 | use SureCart\Integrations\ThriveAutomator\Triggers\PurchaseInvokedTrigger; |
| 16 | use SureCart\Integrations\ThriveAutomator\Triggers\PurchaseUpdatedTrigger; |
| 17 | |
| 18 | /** |
| 19 | * Bootstrap the Thrive Automator integration. |
| 20 | */ |
| 21 | class ThriveAutomatorService { |
| 22 | /** |
| 23 | * Bootstrap |
| 24 | * |
| 25 | * @return void |
| 26 | */ |
| 27 | public function bootstrap() { |
| 28 | if ( ! function_exists( 'thrive_automator_register_app' ) ) { |
| 29 | return; |
| 30 | } |
| 31 | // app. |
| 32 | thrive_automator_register_app( ThriveAutomatorApp::class ); |
| 33 | |
| 34 | // data objects. |
| 35 | thrive_automator_register_data_object( ProductDataObject::class ); |
| 36 | thrive_automator_register_data_object( PreviousProductDataObject::class ); |
| 37 | |
| 38 | // data fields. |
| 39 | thrive_automator_register_data_field( ProductNameDataField::class ); |
| 40 | thrive_automator_register_data_field( ProductIDDataField::class ); |
| 41 | thrive_automator_register_data_field( ProductDataField::class ); |
| 42 | // previous. |
| 43 | thrive_automator_register_data_field( PreviousProductDataField::class ); |
| 44 | thrive_automator_register_data_field( PreviousProductIDDataField::class ); |
| 45 | thrive_automator_register_data_field( PreviousProductNameField::class ); |
| 46 | |
| 47 | // triggers. |
| 48 | thrive_automator_register_trigger( PurchaseCreatedTrigger::class ); |
| 49 | thrive_automator_register_trigger( PurchaseRevokedTrigger::class ); |
| 50 | thrive_automator_register_trigger( PurchaseUpdatedTrigger::class ); |
| 51 | thrive_automator_register_trigger( PurchaseInvokedTrigger::class ); |
| 52 | } |
| 53 | |
| 54 | } |
| 55 |