| @@ -838,11 +838,12 @@ | ||
| 838 | 838 | } |
| 839 | 839 | |
| 840 | 840 | /** |
| 841 | 841 | * The readable-catalog predicate over a post alias and its parent alias — a published product, |
| 842 | - * or a variation whose parent product is published. One home for the rule. | |
| 842 | + * or a variation whose parent product is published. One home for the rule. The wcpos/v2 products | |
| 843 | + * ID fast path ({@see \WCPOS\WooCommercePOS\API\V2\Proxy\Products_Proxy_Behavior::fast_response()}) calls it too. | |
| 843 | 844 | */ |
| 844 | - private function published_product_predicate_sql( string $post_alias, string $parent_alias ): string { | |
| 845 | + public static function published_product_predicate_sql( string $post_alias, string $parent_alias ): string { | |
| 845 | 846 | return "(({$post_alias}.post_type = 'product' AND {$post_alias}.post_status = 'publish')" |
| 846 | 847 | . " OR ({$post_alias}.post_type = 'product_variation' AND {$parent_alias}.post_type = 'product'" |
| 847 | 848 | . " AND {$parent_alias}.post_status = 'publish'))"; |
| 848 | 849 | } |