PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.21
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.21
1.10.23 1.10.22 1.10.21 1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 All 167 releases
← All changes | includes/Rest_Cors.php +10 -0 1.10.4 → 1.10.21 View file →
@@ -344,8 +344,18 @@
344 344 if ( ! empty( $query_params[ SHORT_NAME ] ) ) {
345 345 return true;
346 346 }
347 347
348 + // The client's discovery probe of the REST index. When a host strips the
349 + // front page's `Link` header, `use-url-discovery.ts` falls back to a HEAD
350 + // of `/wp-json/`, sent as `?_method=head` with no marker (HEAD carries no
351 + // `X-WCPOS` so it needs no preflight). The front-end twin lives in
352 + // `Init::send_headers()`; before 1.10.0 every REST response was stamped,
353 + // so the probe never needed claiming (roadmap#383).
354 + if ( '/' === $request->get_route() && isset( $query_params['_method'] ) && 'head' === strtolower( (string) $query_params['_method'] ) ) {
355 + return true;
356 + }
357 +
348 358 return 'OPTIONS' === $request->get_method() && self::preflight_announces_wcpos( $request );
349 359 }
350 360
351 361 /**