WordPress at a glance
function is not described

wp_xmlrpc_server::set_term_custom_fields() public WP 4.9.0

Set custom fields for a term.

{} It's a method of the class: wp_xmlrpc_server{}

No Hooks.

Return

Null. Nothing.

Usage

$wp_xmlrpc_server = new wp_xmlrpc_server();
$wp_xmlrpc_server->set_term_custom_fields( $term_id, $fields );
$term_id(int) (required)
Term ID.
$fields(array) (required)
Custom fields.

Changelog

Since 4.9.0 Introduced.

Code of wp_xmlrpc_server::set_term_custom_fields() WP 5.5.1

<?php
public function set_term_custom_fields( $term_id, $fields ) {
	$term_id = (int) $term_id;

	foreach ( (array) $fields as $meta ) {
		if ( isset( $meta['id'] ) ) {
			$meta['id'] = (int) $meta['id'];
			$pmeta      = get_metadata_by_mid( 'term', $meta['id'] );
			if ( isset( $meta['key'] ) ) {
				$meta['key'] = wp_unslash( $meta['key'] );
				if ( $meta['key'] !== $pmeta->meta_key ) {
					continue;
				}
				$meta['value'] = wp_unslash( $meta['value'] );
				if ( current_user_can( 'edit_term_meta', $term_id ) ) {
					update_metadata_by_mid( 'term', $meta['id'], $meta['value'] );
				}
			} elseif ( current_user_can( 'delete_term_meta', $term_id ) ) {
				delete_metadata_by_mid( 'term', $meta['id'] );
			}
		} elseif ( current_user_can( 'add_term_meta', $term_id ) ) {
			add_term_meta( $term_id, $meta['key'], $meta['value'] );
		}
	}
}