add_woocommerce_term_meta()WC 1.0

Deprecated since 3.6.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

WooCommerce Term Meta API.

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.

No Hooks.

Returns

true|false.

Usage

add_woocommerce_term_meta( $term_id, $meta_key, $meta_value, $unique );
$term_id(int) (required)
Term ID.
$meta_key(string) (required)
Meta key.
$meta_value(mixed) (required)
Meta value.
$unique(true|false)
Make meta key unique. .
Default: false)

Changelog

Deprecated since 3.6.0

add_woocommerce_term_meta() code WC 10.6.2

function add_woocommerce_term_meta( $term_id, $meta_key, $meta_value, $unique = false ) {
	wc_deprecated_function( 'add_woocommerce_term_meta', '3.6', 'add_term_meta' );
	return function_exists( 'add_term_meta' ) ? add_term_meta( $term_id, $meta_key, $meta_value, $unique ) : add_metadata( 'woocommerce_term', $term_id, $meta_key, $meta_value, $unique );
}