Check if a WooCommerce Order Item has a specific meta data key

You should use isset():

if ( isset( $item_data['name'] ) ) {
    // your code 
} 

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)