Skip to content

Instantly share code, notes, and snippets.

Christian Schoenmakers wespiremedia

Block or report user

Report or block wespiremedia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
wespiremedia / .php
Created Sep 1, 2018
FacetWP - map taxonomies of parent product to variation
View .php
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
wespiremedia / gist:ad3713a6336a7b2dcc31da71fecefec5
Created Sep 1, 2018
FacetWP - only index product variations
View gist:ad3713a6336a7b2dcc31da71fecefec5
// 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;
wespiremedia / 0_reuse_code.js
Created Mar 8, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.