Warning: This function has been deprecated.
get_woocommerce_term_meta( int $term_id, string $key, bool $single = true )
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
- $term_id
-
(Required) Term ID.
- $key
-
(Required) Meta key.
- $single
-
(Optional) Whether to return a single value. (default: true).
Default value: true
Return Return
(mixed)
Source Source
File: includes/wc-deprecated-functions.php
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 ); }
Changelog Changelog
Version | Description |
---|---|
3.6.0 | Introduced. |