fixed mysql_connect error
This commit is contained in:
parent
51f3dcb4ee
commit
c5d51d400e
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue