| @@ -8,12 +8,14 @@ | ||
| 8 | 8 | |
| 9 | 9 | defined('ABSPATH') || die('No direct access.'); |
| 10 | 10 | |
| 11 | 11 | use Extendify\Agent\Controllers\ChatHistoryController; |
| 12 | +use Extendify\PartnerData; | |
| 12 | 13 | use Extendify\Shared\DataProvider\ResourceData; |
| 13 | 14 | use Extendify\Shared\Services\AutoUpdate\AutoUpdate; |
| 14 | 15 | use Extendify\Shared\Services\LaunchUpdate\LaunchUpdater; |
| 15 | 16 | use Extendify\Shared\Services\Sanitizer; |
| 17 | +use Extendify\SiteVisibility; | |
| 16 | 18 | |
| 17 | 19 | /** |
| 18 | 20 | * The controller for interacting with WordPress. |
| 19 | 21 | */ |
| @@ -157,9 +159,15 @@ | ||
| 157 | 159 | \update_option('extendify_check_for_image_imports', true, false); |
| 158 | 160 | \delete_transient('extendify_import_images_check_delay'); |
| 159 | 161 | |
| 160 | 162 | \update_option('extendify_onboarding_completed', gmdate('Y-m-d\TH:i:s\Z')); |
| 163 | + // Anything already in the chat reads as an onboarding offer the user answered. | |
| 164 | + ChatHistoryController::clear(); | |
| 161 | 165 | LaunchUpdater::clearAttempts(); |
| 166 | + | |
| 167 | + if (PartnerData::setting('useComingSoon')) { | |
| 168 | + SiteVisibility::markUnpublished(); | |
| 169 | + } | |
| 162 | 170 | |
| 163 | 171 | \do_action('extendify_after_launch'); |
| 164 | 172 | |
| 165 | 173 | return new \WP_REST_Response('ok'); |