We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gpi-limit-by-field-value-match.php
1 parent f10f675 commit 83924f8Copy full SHA for 83924f8
gp-inventory/gpi-limit-by-field-value-match.php
@@ -7,10 +7,11 @@
7
*/
8
// Update "123" to your form ID and "4" to your Inventory-enabled field ID.
9
add_filter( 'gpi_query_123_4', function ( $query ) {
10
+ global $wpdb;
11
12
// Update "5" to the ID of the field you would like to match and "xyz" to the value you would like to match.
13
$query['where'] .= ' AND em_by_field.meta_key = "5" AND em_by_field.meta_value = "xyx" ';
- $query['join'] .= ' INNER JOIN wp_gf_entry_meta em_by_field ON em_by_field.entry_id = em.entry_id ';
14
+ $query['join'] .= " INNER JOIN {$wpdb->prefix}gf_entry_meta em_by_field ON em_by_field.entry_id = em.entry_id ";
15
16
return $query;
17
} );
0 commit comments