Skip to content

Instantly share code, notes, and snippets.

@sachyya
Last active May 2, 2022 05:40
Show Gist options
  • Save sachyya/79313336540fe86cdba42fcf588677aa to your computer and use it in GitHub Desktop.
Save sachyya/79313336540fe86cdba42fcf588677aa to your computer and use it in GitHub Desktop.
Move default Category filter below custom filters in Typsense Search for WooCommerce
<?php
$tmpl_hook_obj = Codemanas\Typesense\WooCommerce\Main\TemplateHooks::get_instance();
remove_action( 'cm_tsfwc_filter_panel_output', [ $tmpl_hook_obj, 'category_filter' ], 5 ); //This must be 5
add_action( 'cm_tsfwc_filter_panel_output', [ $tmpl_hook_obj, 'category_filter'], 18 ); // You can change the priority as per your requirement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment