fixed mysql_connect error

This commit is contained in:
magepeopleteam 2019-03-20 03:55:41 +00:00
parent 51f3dcb4ee
commit c5d51d400e
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ function mep_event_get_order_meta($item_id,$key){
global $wpdb;
$table_name = $wpdb->prefix."woocommerce_order_itemmeta";
$sql = 'SELECT meta_value FROM '.$table_name.' WHERE order_item_id ='.$item_id.' AND meta_key="'.$key.'"';
$results = $wpdb->get_results($sql) or die(mysql_error());
$results = $wpdb->get_results($sql);
foreach( $results as $result ) {
$value = $result->meta_value;
}