| @@ -19,8 +19,18 @@ | ||
| 19 | 19 | public static function activate() |
| 20 | 20 | { |
| 21 | 21 | WooMailerLiteMigration::migrate(); |
| 22 | 22 | WooMailerLiteOptions::update('initial_sync', false); |
| 23 | + | |
| 24 | + if (WooMailerLiteOptions::get('shopId')) { | |
| 25 | + try { | |
| 26 | + WooMailerLiteApi::client()->toggleShop(home_url(), 1); | |
| 27 | + } catch (Throwable $th) { | |
| 28 | + WooMailerLiteLog()->error('WooMailerLiteActivator::activate toggleShop failed', [ | |
| 29 | + 'error' => $th->getMessage(), | |
| 30 | + ]); | |
| 31 | + } | |
| 32 | + } | |
| 23 | 33 | } |
| 24 | 34 | |
| 25 | 35 | public static function deactivate() |
| 26 | 36 | { |