update_woocommerce_term_meta()
Deprecated from version 3.6.0. It is no longer supported and can 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.
Return
true|false
.
Usage
update_woocommerce_term_meta( $term_id, $meta_key, $meta_value, $prev_value );
- $term_id(int) (required)
- Term ID.
- $meta_key(string) (required)
- Meta key.
- $meta_value(mixed) (required)
- Meta value.
- $prev_value(string)
- Previous value. ..
Default: ''
Changelog
Deprecated since | 3.6.0 |
update_woocommerce_term_meta() update woocommerce term meta code WC 9.6.1
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 ); }