get_json_params(); $section = ! empty( $body['section'] ) ? sanitize_text_field( $body['section'] ) : null; $wizard = ! empty( $body['wizard'] ) ? $body['wizard'] : null; $network = ! empty( $body['network'] ) ? $body['network'] : false; if ( 'additionalInformation' === $section && ! empty( $wizard['additionalInformation'] ) ) { $additionalInformation = $wizard['additionalInformation']; if ( ! empty( $additionalInformation['socialShareImage'] ) ) { aioseo()->options->social->facebook->general->defaultImageTerms = $additionalInformation['socialShareImage']; aioseo()->options->social->twitter->general->defaultImageTerms = $additionalInformation['socialShareImage']; } } if ( ( 'features' === $section || 'license-key' === $section ) && ! empty( $wizard['features'] ) ) { $features = $wizard['features']; $cantInstall = []; $addons = aioseo()->addons->getAddonSkus(); foreach ( $addons as $sku ) { if ( in_array( $sku, $features, true ) ) { $addon = aioseo()->addons->getAddon( $sku, true ); if ( ! $addon->isActive && ! $addon->requiresUpgrade ) { if ( $addon->installed || $addon->canInstall ) { aioseo()->addons->installAddon( $addon->basename, $network ); } else { $cantInstall[] = $addon->name; } } } } if ( ! empty( $cantInstall ) ) { $notification = Models\Notification::getNotificationByName( 'install-addons' ); if ( ! $notification->exists() ) { $content = ''; foreach ( $cantInstall as $pluginName ) { $content .= '