This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'facetwp_indexer_row_data', function( $rows, $params ) { | |
$extra_taxonomies = array( | |
'producttype' => 'product-type', // Facet WP facet name => taxonomy name | |
); | |
// Check if facet name is extra taxonomy | |
if ( array_key_exists($params['facet']['name'], $extra_taxonomies) ){ | |
// Set taxonomy to check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Facet WP - Only index variations and added hook to append main product data to variation product data | |
add_filter( 'facetwp_indexer_query_args', function( $args ) { | |
$args['post_type'] = array('product_variation'); | |
return $args; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |