| @@ -352,8 +352,13 @@ | ||
| 352 | 352 | * @return array<int, string> |
| 353 | 353 | */ |
| 354 | 354 | public function read_digests( string $collection, array $ids ): array { |
| 355 | 355 | global $wpdb; |
| 356 | + // Order/customer upserts are coalesced per request and land at shutdown | |
| 357 | + // (see Integrity_Digest::$pending_digests). A read inside the same | |
| 358 | + // request — the pull lane stamping `_rxdb_digest` after a write — must | |
| 359 | + // see the settled digest, so land what is owed before reading. | |
| 360 | + Integrity_Digest::flush_pending_digests(); | |
| 356 | 361 | $object_types = self::digest_object_types( $collection ); |
| 357 | 362 | if ( array() === $object_types ) { |
| 358 | 363 | return array(); |
| 359 | 364 | } |