classes/Pods.php
public function export( $fields = null, $id = null, $format = null ) {

		$params = array(
			'pod'     => $this->pod,
			'id'      => $id,
			'fields'  => null,
			'depth'   => 2,
			'flatten' => false,
			'context' => null,
			'format'  => $format,
		);

		if ( is_array( $fields ) && ( isset( $fields['fields'] ) || isset( $fields['depth'] ) ) ) {
			$params = array_merge( $params, $fields );
		} else {
			$params['fields'] = $fields;
		}

		if ( isset( $params['fields'] ) && is_array( $params['fields'] ) && ! in_array( $this->pod_data['field_id'], $params['fields'], true ) ) {
			$params['fields'] = array_merge( array( $this->pod_data['field_id'] ), $params['fields'] );
		}

		if ( null === $params['id'] ) {
			$params['id'] = $this->id();
		}

		$params = (array) $this->do_hook( 'export', $params );

		if ( empty( $params['id'] ) ) {
			return false;
		}

		$data = $this->api->export_pod_item( $params );

		if ( ! empty( $params['format'] ) && 'json' === $params['format'] ) {
			$data = wp_json_encode( (array) $data );
		}

		return $data;
	}
public function export( $fields = null, $id = null, $format = null ) {

		$params = array(
			'pod'     => $this->pod,
			'id'      => $id,
			'fields'  => null,
			'depth'   => 2,
			'flatten' => false,
			'context' => null,
			'format'  => $format,
		);

		if ( is_array( $fields ) && ( isset( $fields['fields'] ) || isset( $fields['depth'] ) ) ) {
			$params = array_merge( $params, $fields );
		} else {
			$params['fields'] = $fields;
		}

		if ( isset( $params['fields'] ) && is_array( $params['fields'] ) && ! in_array( $this->pod_data['field_id'], $params['fields'], true ) ) {
			$params['fields'] = array_merge( array( $this->pod_data['field_id'] ), $params['fields'] );
		}

		if ( null === $params['id'] ) {
			$params['id'] = $this->id();
		}

		$params = (array) $this->do_hook( 'export', $params );

		if ( empty( $params['id'] ) ) {
			return false;
		}

		$data = $this->api->export_pod_item( $params );

		if ( ! empty( $params['format'] ) && 'json' === $params['format'] ) {
			$data = wp_json_encode( (array) $data );
		}

		return $data;
	}
public function export ( $ fields = null , $ id = null , $ format = null ) { $ params = array ( 'pod' => $ this -> pod , 'id' => $ id , 'fields' => null , 'depth' => 2 , 'flatten' => false , 'context' => null , 'format' => $ format , ) ; if ( is_array ( $ fields ) && ( isset ( $ fields [ 'fields' ] ) || isset ( $ fields [ 'depth' ] ) ) ) { $ params = array_merge ( $ params , $ fields ) ; } else { $ params [ 'fields' ] = $ fields ; } if ( isset ( $ params [ 'fields' ] ) && is_array ( $ params [ 'fields' ] ) && ! in_array ( $ this -> pod_data [ 'field_id' ] , $ params [ 'fields' ] , true ) ) { $ params [ 'fields' ] = array_merge ( array ( $ this -> pod_data [ 'field_id' ] ) , $ params [ 'fields' ] ) ; } if ( null === $ params [ 'id' ] ) { $ params [ 'id' ] = $ this -> id ( ) ; } $ params = ( array ) $ this -> do_hook ( 'export' , $ params ) ; if ( empty ( $ params [ 'id' ] ) ) { return false ; } $ data = $ this -> api -> export_pod_item ( $ params ) ; if ( ! empty ( $ params [ 'format' ] ) && 'json' === $ params [ 'format' ] ) { $ data = wp_json_encode ( ( array ) $ data ) ; } return $ data ; }
Export an item's data

@see   PodsAPI::export_pod_item

@param array       $fields (optional) Fields to export.
@param int         $id     (optional) ID of the pod item to export.
@param null|string $format (optional) The format of the export (php | json).

@return array|bool Data array of the exported pod item

@since 2.0.0
@link  https://pods.io/docs/export/
Export an item s data