predictive_search_post_types_support
The WooCommerce Predictive Search LITE predictive search post types support hook.
Description
Parameters (1)
- 0. $post_types (unknown)
- The post types.
Usage
- To run the hook, copy the example below.
- $post_types = apply_filters( 'predictive_search_post_types_support', $post_types );
- if ( !empty( $post_types ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the predictive_search_post_types_support callback
- function filter_predictive_search_post_types_support( $post_types ) {
- // make filter magic happen here...
- return $post_types;
- };
- // add the filter
- add_filter( 'predictive_search_post_types_support', 'filter_predictive_search_post_types_support', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'predictive_search_post_types_support', 'filter_predictive_search_post_types_support', 10, 1 );
Defined (3)
The filter is defined in the following location(s).
- /classes/class-wc-predictive-search-synch.php
- $post_types = apply_filters( 'predictive_search_post_types_support', $post_types );
- $post_types = apply_filters( 'predictive_search_post_types_support', array( 'post', 'page', 'product' ) );
- $post_types = apply_filters( 'predictive_search_post_types_support', array( 'post', 'page', 'product' ) );