| @@ -294,8 +294,23 @@ | ||
| 294 | 294 | return $registered; |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | /** |
| 298 | + * Detach THE digest stamper from both served read lanes. | |
| 299 | + * | |
| 300 | + * The teardown twin of {@see register_proxy_digest_stampers()}, matching the | |
| 301 | + * `unregister_*` seams {@see Revision} and {@see Proxy_Uuid_Stamper} already | |
| 302 | + * expose. `Augmentation_Pipeline::reset()` only removes the projections the | |
| 303 | + * pipeline itself installed, so without this a caller that installs the real | |
| 304 | + * pipeline — a test wiring the production read lane — cannot unwind it and | |
| 305 | + * leaks this filter into everything that runs after it. | |
| 306 | + */ | |
| 307 | + public static function unregister_proxy_digest_stampers(): void { | |
| 308 | + remove_filter( 'woocommerce_pos_sync_proxy_response', array( __CLASS__, 'stamp_digests' ), 10 ); | |
| 309 | + remove_filter( 'woocommerce_pos_sync_order_pull_payloads', array( __CLASS__, 'stamp_digests' ), 10 ); | |
| 310 | + } | |
| 311 | + | |
| 312 | + /** | |
| 298 | 313 | * Attach each served record's stored 64-bit digest as a top-level `_rxdb_digest` |
| 299 | 314 | * string, so the client seeds its existence-reconcile manifest (ADR 0014 Leg 3) |
| 300 | 315 | * as records flow through the NORMAL pull — no separate fetch. The client reads |
| 301 | 316 | * it into the sidecar manifest; it is NOT persisted into the document. A record |