Make WooCommerce Order Notes searchable by SearchWP
<?php | |
// Make WooCommerce Order Notes searchable by SearchWP. | |
// @link https://searchwp.com/documentation/knowledge-base/search-woocommerce-orders/ | |
add_action( 'searchwp\source\post\attributes\comments', function() { | |
if ( did_action( 'searchwp\indexer\batch' ) ) { | |
remove_filter( 'comments_clauses', [ 'WC_Comments', 'exclude_order_comments' ] ); | |
} | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment