Export a gravityforms field using php code

Hello,

I have a registration gravityforms that I defined a country field in that.

I would like to export country field in dokan report excel and I write below php code in dokan plugin, but unfortunately it returns same country for all user orders.

How can I correct that?

case 'country': 
					$result = GFAPI::get_entries(3);    //gravityforms id= 3
					for($i=0; $i<count($result); $i++){
						$guser_id = $result[$i]['created_by'];
						$user_id = $the_order->customer_id;
						if($guser_id == $user_id) {
						$line[ $row_key ] = $result[$i][5];   // country field id = 5
						break;
						}
					}
			    	break;

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.