PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.19
ووسلام – همگام سازی ووکامرس و باسلام v1.10.19
1.10.19 1.10.20 1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.2 1.9.1 1.9.0 1.8.8 1.8.5 1.8.6 All 53 releases
← All changes | includes/Config/Endpoints.php +28 -1 1.10.51.10.19 View file →
@@ -29,8 +29,11 @@
29 29
30 30 /** PATCH update an existing product — sprintf($url, $basalamProductId) */
31 31 const PRODUCT_UPDATE = self::OPENAPI_BASE . '/v1/products/%d';
32 32
33 + /** PATCH update a single variation of a product — sprintf($url, $basalamProductId, $basalamVariationId) */
34 + const PRODUCT_VARIATION_UPDATE = self::CORE_BASE . '/v4/products/%d/variations/%d';
35 +
33 36 /** POST batch-update products for a vendor */
34 37 const PRODUCT_BATCH_UPDATE = self::OPENAPI_BASE . '/v1/vendors/%d/products/batch-updates?continue_on_error=true';
35 38
36 39 /** GET vendor information — sprintf($url, $vendorId) */
@@ -36,9 +39,9 @@
36 39 /** GET vendor information — sprintf($url, $vendorId) */
37 40 const VENDOR_INFO = self::OPENAPI_BASE . '/v1/vendors/%d';
38 41
39 42 /** GET category-detection prediction — append encoded title as query param */
40 - const CATEGORY_DETECT = self::CATEGORY_BASE . '/category_detection/api_v1.0/predict/';
43 + const CATEGORY_DETECT = self::CATEGORY_BASE . '/category_detection/api_v2.0/predict/';
41 44
42 45 /** POST initialize a product media upload */
43 46 const MEDIA_UPLOAD_REQUEST = self::UPLOAD_BASE . '/v3/media/upload-request';
44 47
@@ -124,8 +127,11 @@
124 127
125 128 /** POST ticket reply items — sprintf($url, $ticketId) */
126 129 const TICKET_ITEMS = self::HAMSALAM_BASE . '/tickets/%d/ticket-items';
127 130
131 + /** PUT encrypted business site access — sprintf($url, $businessId) */
132 + const BUSINESS_SITE_ACCESS = self::HAMSALAM_BASE . '/businesses/%d/site-access';
133 +
128 134 /** POST upload ticket media */
129 135 const TICKET_MEDIA_UPLOAD = self::HAMSALAM_BASE . '/media';
130 136
131 137 // App Store
@@ -131,8 +137,29 @@
131 137 // App Store
132 138
133 139 /** POST app review */
134 140 const APP_REVIEW = self::APPS_BASE . '/v1/apps/13/reviews';
141 +
142 + /**
143 + * Replace only the Hamsalam base URL when a local/test override exists.
144 + * Production keeps using the compile-time constants above.
145 + */
146 + public static function resolve(string $url): string
147 + {
148 + if (!defined('SYNC_BASALAM_HAMSALAM_BASE_URL')) {
149 + return $url;
150 + }
151 +
152 + $override = rtrim(
153 + (string) constant('SYNC_BASALAM_HAMSALAM_BASE_URL'),
154 + '/'
155 + );
156 + if ($override === '' || strpos($url, self::HAMSALAM_BASE) !== 0) {
157 + return $url;
158 + }
159 +
160 + return $override . substr($url, strlen(self::HAMSALAM_BASE));
161 + }
135 162
136 163 // Helpers
137 164
138 165 /** Build the SSO login URL */