← All changes
|
app/Assist/Controllers/RecommendationsController.php
+3
-8
3.0.4
→
3.2.1
View file →
| @@ -5,8 +5,10 @@ | ||
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | namespace Extendify\Assist\Controllers; |
| 8 | 8 | |
| 9 | +use Extendify\Constants; | |
| 10 | + | |
| 9 | 11 | defined('ABSPATH') || die('No direct access.'); |
| 10 | 12 | |
| 11 | 13 | /** |
| 12 | 14 | * The controller for fetching recommendations |
| @@ -14,15 +16,8 @@ | ||
| 14 | 16 | |
| 15 | 17 | class RecommendationsController |
| 16 | 18 | { |
| 17 | 19 | /** |
| 18 | - * The url for the server. | |
| 19 | - * | |
| 20 | - * @var string | |
| 21 | - */ | |
| 22 | - public static $host = 'https://dashboard.extendify.com'; | |
| 23 | - | |
| 24 | - /** | |
| 25 | 20 | * Return recommendations from source. |
| 26 | 21 | * |
| 27 | 22 | * @return \WP_REST_Response |
| 28 | 23 | */ |
| @@ -41,9 +36,9 @@ | ||
| 41 | 36 | 'wp_language' => get_locale(), |
| 42 | 37 | 'sdk_partner' => defined('EXTENDIFY_PARTNER_ID') ? EXTENDIFY_PARTNER_ID : '', |
| 43 | 38 | ]); |
| 44 | 39 | $response = \wp_remote_get( |
| 45 | - sprintf('%s/api/assist/recommendations?%s', static::$host, $params), | |
| 40 | + sprintf('%s/api/assist/recommendations?%s', Constants::DASHBOARD_HOST, $params), | |
| 46 | 41 | [ |
| 47 | 42 | 'headers' => [ |
| 48 | 43 | 'Content-Type' => 'application/json', |
| 49 | 44 | 'Accept' => 'application/json', |