Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active August 26, 2016 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/647118ccaeeaf614ba5a210df4a36405 to your computer and use it in GitHub Desktop.
Save jchristopher/647118ccaeeaf614ba5a210df4a36405 to your computer and use it in GitHub Desktop.
See https://searchwp.com/docs/kb/searching-woocommerce-orders/ for full walkthrough to integrate SearchWP and WooCommerce Order searching
<?php
/**
* Let SearchWP index WooCommerce Order Notes
*/
function my_searchwp_indexer_pre_get_comments() {
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ) );
}
add_action( 'searchwp_indexer_pre_get_comments', 'my_searchwp_indexer_pre_get_comments' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment