Created
March 19, 2015 12:55
-
-
Save SirDarcanos/3e25aa55cf65255ee314 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 the meta _transaction_id in the search fields. | |
* | |
* @param array $fields | |
* @return array | |
*/ | |
function wc_custom_order_filter_fields( $fields ) { | |
if ( ! in_array( '_transaction_id', $fields ) ) { | |
array_push( $fields, '_transaction_id' ); | |
} | |
return $fields; | |
} | |
add_filter( 'woocommerce_shop_order_search_fields', 'wc_custom_order_filter_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment