| @@ -162,13 +162,14 @@ | ||
| 162 | 162 | * @param array $args Query args to filter. |
| 163 | 163 | * @param string $collection Collection being queried: `products` or `variations`. Any other |
| 164 | 164 | * value returns the args untouched. |
| 165 | 165 | * @param null|string $scope Visibility scope: `default` or a store id. Null means default. |
| 166 | + * @param null|string $type Explicit lane type, or null for the collection default. | |
| 166 | 167 | * |
| 167 | 168 | * @return array |
| 168 | 169 | */ |
| 169 | - public function apply_to_wp_query_args( array $args, string $collection, ?string $scope = null ): array { | |
| 170 | - $type = self::collection_type( $collection ); | |
| 170 | + public function apply_to_wp_query_args( array $args, string $collection, ?string $scope = null, ?string $type = null ): array { | |
| 171 | + $type = $type ?? self::collection_type( $collection ); | |
| 171 | 172 | if ( null === $type ) { |
| 172 | 173 | return $args; |
| 173 | 174 | } |
| 174 | 175 | |