Skip to content

Commit

Permalink
Add table prefix by $wpdb->prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinderk committed Jan 18, 2018
1 parent fe1ced9 commit 9e7bbe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-give-db-meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public function __rename_meta_table_name_in_query( $clause, $wp_query ) {
continue;
}

preg_match( '/wp_give_paymentmeta AS (.*) ON/', $clause_part, $alias_table_name );
preg_match( '/' . $wpdb->prefix . 'give_paymentmeta AS (.*) ON/', $clause_part, $alias_table_name );

if( isset( $alias_table_name[1] ) ) {
$clause[$key] = str_replace( "{$alias_table_name[1]}.post_id", "{$alias_table_name[1]}.{$this->meta_type}_id", $clause_part );
Expand Down

0 comments on commit 9e7bbe3

Please sign in to comment.