Category PickPlugins Product Filter for WooCommerce

wc_pf_query_args

You can override query arguments via this filter hook function wc_pf_query_args_custom_field($args, $form_data){ //default search query $args[‘s’] = isset($form_data[‘keyword’]) ? $form_data[‘keyword’] : ”; return $args; } add_action(‘wc_pf_query_args’, ‘wc_pf_query_args_custom_field’); You can see the query parameter details here

How to remove existing input field?

By action hook you can simply remove any input fields exist. remove_action(‘WooShopFilter_fields’,’WooShopFilter_field_keyword’,30); remove_action(‘WooShopFilter_fields’,’WooShopFilter_field_categories’,30); remove_action(‘WooShopFilter_fields’,’WooShopFilter_field_tags’,30); remove_action(‘WooShopFilter_fields’,’WooShopFilter_field_price_range’,30); remove_action(‘WooShopFilter_fields’,’WooShopFilter_field_order’,30); remove_action(‘WooShopFilter_fields’,’WooShopFilter_field_orderby’,30); remove_action(‘WooShopFilter_fields’,’WooShopFilter_field_onsale’,30); remove_action(‘WooShopFilter_fields’,’WooShopFilter_field_in_stock’,30); remove_action(‘WooShopFilter_fields’,’WooShopFilter_field_keyword’,30); remove_action(‘WooShopFilter_fields’,’WooShopFilter_field_sku’,30);  

WCProductFilter_fields

add_action(‘WCProductFilter_fields’,’WCProductFilter_field_my_custom_input’, 30); function WCProductFilter_field_my_custom_input(){ $WCProductFilter = isset($_GET[‘WCProductFilter’]) ? sanitize_text_field($_GET[‘WCProductFilter’]) :””; // check this to ensure for is submitted from WCProductFilter. $_custom_input = isset($_GET[‘_custom_input’]) ? sanitize_text_field($_GET[‘_custom_input’]) :””; // Do not forget to sanitization if(!$WCProductFilter): $_custom_input = ”; endif; /* * *…