See https://searchwp.com/docs/kb/searching-woocommerce-orders/ for full walkthrough to integrate SearchWP and WooCommerce Order searching
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
<?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