Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

Commit 2c14360

Browse files
committed
Add inline documentation to help anyone later who may wonder why we're hooking into this particular filter.
1 parent c04ef88 commit 2c14360

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test-filters.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ public function test_wc_get_orders_custom_meta_key() {
8181
$order->update_meta_data( '_custom_meta_key', 'value' );
8282
$order->save();
8383

84+
// Because we hook into this filter, we need to ensure that if anyone else also hooks in, that we're
85+
// properly handling the resulting postmeta table JOIN clause in the resulting SQL query.
8486
add_filter('woocommerce_order_data_store_cpt_get_orders_query', function ( $query, $query_vars ) {
8587
if ( ! empty( $query_vars['_custom_meta_key'] ) ) {
8688
$query['meta_query'][] = array(

0 commit comments

Comments
 (0)