What it does
AJAX Filters, in practice.
The [ambikly_filters] shortcode renders an aside with published-category checkboxes, minimum and maximum price inputs, a sort selector (default, popularity, newest, price ascending and descending) and a Reset button. Any change is debounced for 250 ms and sent to GET /ambikly-pro/v1/filtered-products, which returns published products matching the selected category ids, price range and the term in the core shop search box, paginated at up to 60 per page. Popularity is computed from units sold on non-cancelled orders. The script replaces the contents of the element carrying data-ambikly-products-grid with cards that use the same markup as the server-rendered grid, discards stale responses, and shows an error message if a request fails.