Change post types to exclude from WP/WC searches by post content
function wc_filter_search_add_post_type( $array ) { | |
array_push( $array, 'your_post_type' ); | |
array_push( $array, 'another_post_type' ); | |
array_push( $array, 'etc' ); | |
return array; | |
} | |
add_filter( 'wc_filter_search_not_allowed_array', 'wc_filter_search_add_post_type' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment