How to search by custom taxonomy?

The solution works only for the Pro plugin version.

The solution requires custom PHP snippets. To apply it, you have to paste the following code into functions.php in your child theme or use Code Snippets plugin.

The following sample is taken from the Bookstore. Authors of the books are custom taxonomies.

define( 'WCAS_SAMPLE_CUSTOM_TAXONOMY', 'book_author' ); // Replace with yours!!!


/**
 * Includes taxonomy during the main indexing process
 */
add_action( 'dgwt/wcas/tnt/source_query/before_request', function ( $source_query ) {

	if ( method_exists( $source_query, 'addTerms' ) ) {
		$source_query->addTerms( WCAS_SAMPLE_CUSTOM_TAXONOMY );
	}

} );

/**
 * Includes taxonomy during updating product
 */
add_filter( 'dgwt/wcas/tnt/indexer/searchable/product_data', function ( $document, $productID, $product ) {

	$author = $product->getTerms( WCAS_SAMPLE_CUSTOM_TAXONOMY, 'string' );
	if ( ! empty( $author ) ) {
		$document[ 'tax_' . WCAS_SAMPLE_CUSTOM_TAXONOMY ] = $author;
	}

	return $document;
}, 10, 3 );

After applying this code go to WooCommerce -> FiboSearch -> Indexer (tab) and rebuild the search index.