Warning: This function has been deprecated.

update_woocommerce_term_meta( int $term_id, string $meta_key, mixed $meta_value, string $prev_value = '' )

WooCommerce Term Meta API.

Description Description

WC tables for storing term meta are deprecated from WordPress 4.4 since 4.4 has its own table. This function serves as a wrapper, using the new table if present, or falling back to the WC table.

Parameters Parameters


(Required) Term ID.


(Required) Meta key.


(Required) Meta value.


(Optional) Previous value. (default: '').

Default value: ''

Top ↑

Return Return


Top ↑

Source Source

File: includes/wc-deprecated-functions.php

function update_woocommerce_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {
	wc_deprecated_function( 'update_woocommerce_term_meta', '3.6', 'update_term_meta' );
	return function_exists( 'update_term_meta' ) ? update_term_meta( $term_id, $meta_key, $meta_value, $prev_value ) : update_metadata( 'woocommerce_term', $term_id, $meta_key, $meta_value, $prev_value );

Top ↑

Changelog Changelog

Version Description
3.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.