How do you set canonical URLs for WooCommerce filter pages?

First decide which filtered combinations have independent search value. Most sorting, price-range, stock, and tracking parameters should not become separate index pages. A small set of curated category and attribute combinations can be indexable when they have stable URLs, inventory, and unique supporting content.
For a duplicate filter view, declare the unfiltered or approved landing page as canonical and avoid listing the filter URL in the sitemap. Keep internal navigation from generating unlimited crawlable combinations. When a view must stay accessible but should not appear in search, a crawlable noindex may be clearer than a misleading canonical.
Do not canonicalize every filtered page blindly if it represents products unavailable on the target page. Test the rendered canonical after cache and AJAX updates. Align SEO plugin settings, theme filters, faceted-navigation plugins, internal links, and robots rules with the same indexation plan.