| @@ -11,8 +11,10 @@ | ||
| 11 | 11 | use Forge12\DoubleOptIn\Container\Container; |
| 12 | 12 | use Forge12\DoubleOptIn\Container\BootableProviderInterface; |
| 13 | 13 | use Forge12\DoubleOptIn\Integration\FormIntegrationRegistry; |
| 14 | 14 | use Forge12\DoubleOptIn\Integration\CF7Integration; |
| 15 | +use Forge12\DoubleOptIn\Integration\CF7FollowUpAdapter; | |
| 16 | +use Forge12\DoubleOptIn\FollowUp\FollowUpAdapterRegistry; | |
| 15 | 17 | use Forge12\DoubleOptIn\Frontend\ErrorNotification; |
| 16 | 18 | use Forge12\Shared\LoggerInterface; |
| 17 | 19 | |
| 18 | 20 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -146,8 +148,12 @@ | ||
| 146 | 148 | // ships as a paid addon that registers via the AddonRegistry. |
| 147 | 149 | try { |
| 148 | 150 | $cf7Integration = $container->get( CF7Integration::class ); |
| 149 | 151 | $registry->register( $cf7Integration ); |
| 152 | + | |
| 153 | + if ( $container->has( FollowUpAdapterRegistry::class ) ) { | |
| 154 | + $container->get( FollowUpAdapterRegistry::class )->register( new CF7FollowUpAdapter( $cf7Integration ) ); | |
| 155 | + } | |
| 150 | 156 | } catch ( \Exception $e ) { |
| 151 | 157 | // Log but don't fail if CF7 integration can't be loaded |
| 152 | 158 | if ( $container->has( LoggerInterface::class ) ) { |
| 153 | 159 | $container->get( LoggerInterface::class )->warning( |