get_woocommerce_term_meta()
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
Mixed.
Usage
get_woocommerce_term_meta( $term_id, $key, $single );
- $term_id(int) (required)
- Term ID.
- $key(string) (required)
- Meta key.
- $single(true|false)
- Whether to return a single value. .
Default: true)
Changelog
| Deprecated since | 3.6.0 |
get_woocommerce_term_meta() get woocommerce term meta code WC 10.4.3
function get_woocommerce_term_meta( $term_id, $key, $single = true ) {
wc_deprecated_function( 'get_woocommerce_term_meta', '3.6', 'get_term_meta' );
return function_exists( 'get_term_meta' ) ? get_term_meta( $term_id, $key, $single ) : get_metadata( 'woocommerce_term', $term_id, $key, $single );
}