classes/PodsTermSplitting.php
private function update_postmeta( $pod_name, $field_name ) {

		/** @global wpdb $wpdb */
		global $wpdb;

		// Fix up the unserialized data
		$task = "update_postmeta_{$pod_name}_{$field_name}_unserialized";
		if ( ! $this->have_done( $task ) ) {

			$wpdb->query(
				$wpdb->prepare(
					"
				UPDATE
					{$wpdb->postmeta} AS meta
					LEFT JOIN {$wpdb->posts} AS t
					ON meta.post_id = t.ID
				SET
					meta_value = %s
				WHERE
					meta_key = %s
					AND meta_value = %s
					AND t.post_type = %s
				", $this->new_term_id, $field_name, $this->term_id, $pod_name
				)
			);

			$this->append_progress( $task );
		}//end if

		// Fix up the serialized data
		$task = "update_postmeta_{$pod_name}_{$field_name}_serialized";
		if ( ! $this->have_done( $task ) ) {

			$meta_key           = sprintf( '_pods_%s', $field_name );
			$target_serialized  = sprintf( ';i:%s;', $this->term_id );
			$replace_serialized = sprintf( ';i:%s;', $this->new_term_id );

			$wpdb->query(
				$wpdb->prepare(
					"
				UPDATE
				    {$wpdb->postmeta} AS meta
			    LEFT JOIN {$wpdb->posts} AS t
					ON meta.post_id = t.ID
				SET
					meta.meta_value = REPLACE( meta.meta_value, %s, %s )
				WHERE
				    meta.meta_key = %s
					AND t.post_type = %s
					AND meta_value LIKE '%%%s%%'
				", $target_serialized, $replace_serialized, $meta_key, $pod_name, pods_sanitize_like( $target_serialized )
				)
			);

			$this->append_progress( $task );
		}//end if

	}
private function update_postmeta( $pod_name, $field_name ) {

		/** @global wpdb $wpdb */
		global $wpdb;

		// Fix up the unserialized data
		$task = "update_postmeta_{$pod_name}_{$field_name}_unserialized";
		if ( ! $this->have_done( $task ) ) {

			$wpdb->query(
				$wpdb->prepare(
					"
				UPDATE
					{$wpdb->postmeta} AS meta
					LEFT JOIN {$wpdb->posts} AS t
					ON meta.post_id = t.ID
				SET
					meta_value = %s
				WHERE
					meta_key = %s
					AND meta_value = %s
					AND t.post_type = %s
				", $this->new_term_id, $field_name, $this->term_id, $pod_name
				)
			);

			$this->append_progress( $task );
		}//end if

		// Fix up the serialized data
		$task = "update_postmeta_{$pod_name}_{$field_name}_serialized";
		if ( ! $this->have_done( $task ) ) {

			$meta_key           = sprintf( '_pods_%s', $field_name );
			$target_serialized  = sprintf( ';i:%s;', $this->term_id );
			$replace_serialized = sprintf( ';i:%s;', $this->new_term_id );

			$wpdb->query(
				$wpdb->prepare(
					"
				UPDATE
				    {$wpdb->postmeta} AS meta
			    LEFT JOIN {$wpdb->posts} AS t
					ON meta.post_id = t.ID
				SET
					meta.meta_value = REPLACE( meta.meta_value, %s, %s )
				WHERE
				    meta.meta_key = %s
					AND t.post_type = %s
					AND meta_value LIKE '%%%s%%'
				", $target_serialized, $replace_serialized, $meta_key, $pod_name, pods_sanitize_like( $target_serialized )
				)
			);

			$this->append_progress( $task );
		}//end if

	}
private function update_postmeta ( $ pod_name , $ field_name ) { /** @global wpdb $wpdb */ global $ wpdb ; // Fix up the unserialized data $ task = "update_postmeta_{$pod_name}_{$field_name}_unserialized" ; if ( ! $ this -> have_done ( $ task ) ) { $ wpdb -> query ( $ wpdb -> prepare ( "
				UPDATE
					{$wpdb->postmeta} AS meta
					LEFT JOIN {$wpdb->posts} AS t
					ON meta.post_id = t.ID
				SET
					meta_value = %s
				WHERE
					meta_key = %s
					AND meta_value = %s
					AND t.post_type = %s
				" , $ this -> new_term_id , $ field_name , $ this -> term_id , $ pod_name ) ) ; $ this -> append_progress ( $ task ) ; } //end if // Fix up the serialized data $ task = "update_postmeta_{$pod_name}_{$field_name}_serialized" ; if ( ! $ this -> have_done ( $ task ) ) { $ meta_key = sprintf ( '_pods_%s' , $ field_name ) ; $ target_serialized = sprintf ( ';i:%s;' , $ this -> term_id ) ; $ replace_serialized = sprintf ( ';i:%s;' , $ this -> new_term_id ) ; $ wpdb -> query ( $ wpdb -> prepare ( "
				UPDATE
				    {$wpdb->postmeta} AS meta
			    LEFT JOIN {$wpdb->posts} AS t
					ON meta.post_id = t.ID
				SET
					meta.meta_value = REPLACE( meta.meta_value, %s, %s )
				WHERE
				    meta.meta_key = %s
					AND t.post_type = %s
					AND meta_value LIKE '%%%s%%'
				" , $ target_serialized , $ replace_serialized , $ meta_key , $ pod_name , pods_sanitize_like ( $ target_serialized ) ) ) ; $ this -> append_progress ( $ task ) ; } //end if }
Called for all fields related to the target taxonomy that are in a post_type

@param string $pod_name
@param string $field_name
Called for all fields related to the target taxonomy that are in a post_type