| @@ -11,8 +11,11 @@ | ||
| 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; | |
| 17 | +use Forge12\DoubleOptIn\Frontend\ConfirmationShortcodes; | |
| 15 | 18 | use Forge12\DoubleOptIn\Frontend\ErrorNotification; |
| 16 | 19 | use Forge12\Shared\LoggerInterface; |
| 17 | 20 | |
| 18 | 21 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -103,8 +106,11 @@ | ||
| 103 | 106 | // Register universal error notification system |
| 104 | 107 | $errorNotification = new ErrorNotification(); |
| 105 | 108 | $errorNotification->register(); |
| 106 | 109 | |
| 110 | + // Confirmation/error page shortcodes + message for failed links (5.8.0). | |
| 111 | + ( new ConfirmationShortcodes() )->register(); | |
| 112 | + | |
| 107 | 113 | $registry = $container->get( FormIntegrationRegistry::class ); |
| 108 | 114 | |
| 109 | 115 | // Register core integrations |
| 110 | 116 | $this->registerCoreIntegrations( $container, $registry ); |
| @@ -146,8 +152,12 @@ | ||
| 146 | 152 | // ships as a paid addon that registers via the AddonRegistry. |
| 147 | 153 | try { |
| 148 | 154 | $cf7Integration = $container->get( CF7Integration::class ); |
| 149 | 155 | $registry->register( $cf7Integration ); |
| 156 | + | |
| 157 | + if ( $container->has( FollowUpAdapterRegistry::class ) ) { | |
| 158 | + $container->get( FollowUpAdapterRegistry::class )->register( new CF7FollowUpAdapter( $cf7Integration ) ); | |
| 159 | + } | |
| 150 | 160 | } catch ( \Exception $e ) { |
| 151 | 161 | // Log but don't fail if CF7 integration can't be loaded |
| 152 | 162 | if ( $container->has( LoggerInterface::class ) ) { |
| 153 | 163 | $container->get( LoggerInterface::class )->warning( |