| @@ -258,9 +258,9 @@ | ||
| 258 | 258 | ); |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | if ( null !== $bucket_raw && '' !== $bucket_raw ) { |
| 262 | - if ( 'products' !== $collection ) { | |
| 262 | + if ( null === ( Collections::row( $collection )['repair']['drill_down'] ?? null ) ) { | |
| 263 | 263 | return new WP_Error( |
| 264 | 264 | 'woocommerce_pos_sync_unsupported_scan_drill_down_collection', |
| 265 | 265 | \sprintf( 'integrity/scan drill-down does not support the "%s" collection', $collection ), |
| 266 | 266 | array( 'status' => 400 ) |
| @@ -266,9 +266,9 @@ | ||
| 266 | 266 | array( 'status' => 400 ) |
| 267 | 267 | ); |
| 268 | 268 | } |
| 269 | 269 | $bucket = max( 0, (int) $bucket_raw ); |
| 270 | - if ( $this->maybe_schedule_digest_rebuild() ) { | |
| 270 | + if ( true === Collections::row( $collection )['repair']['self_heal'] && $this->maybe_schedule_digest_rebuild() ) { | |
| 271 | 271 | return rest_ensure_response( |
| 272 | 272 | $this->envelope( |
| 273 | 273 | array( |
| 274 | 274 | 'bucket_size' => $bucket_size, |
| @@ -296,9 +296,9 @@ | ||
| 296 | 296 | $first_bucket = $after_id > 0 ? ( (int) floor( $after_id / $bucket_size ) ) + 1 : 0; |
| 297 | 297 | $window_start = $first_bucket * $bucket_size; |
| 298 | 298 | $window_end = ( $first_bucket + $limit_buckets ) * $bucket_size; |
| 299 | 299 | |
| 300 | - if ( 'products' === $collection && $this->maybe_schedule_digest_rebuild() ) { | |
| 300 | + if ( true === Collections::row( $collection )['repair']['self_heal'] && $this->maybe_schedule_digest_rebuild() ) { | |
| 301 | 301 | return rest_ensure_response( |
| 302 | 302 | $this->envelope( |
| 303 | 303 | array( |
| 304 | 304 | 'bucket_size' => $bucket_size, |