| @@ -98,10 +98,11 @@ | ||
| 98 | 98 | 200 |
| 99 | 99 | ); |
| 100 | 100 | } |
| 101 | 101 | $read_ids = $ids; |
| 102 | - if ( 'products' === $collection && 'publish' === $request->get_param( 'status' ) ) { | |
| 103 | - $read_ids = $this->index->published_product_ids( $ids ); | |
| 102 | + $published_ids = Collections::row( $collection )['digest']['published_ids'] ?? null; | |
| 103 | + if ( null !== $published_ids && 'publish' === $request->get_param( 'status' ) ) { | |
| 104 | + $read_ids = $this->index->$published_ids( $ids ); | |
| 104 | 105 | } |
| 105 | 106 | $digests = $this->index->read_digests( $collection, $read_ids ); |
| 106 | 107 | $explicit_absence = 'explicit' === $request->get_param( 'absence' ); |
| 107 | 108 | $absent_ids = $explicit_absence ? array_values( array_diff( $ids, array_keys( $digests ) ) ) : array(); |