WC_Post_Data::edit_term()
When editing a term, check for product attributes.
Method of the class: WC_Post_Data{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = WC_Post_Data::edit_term( $term_id, $tt_id, $taxonomy );
- $term_id(int) (required)
- Term ID.
- $tt_id(int) (required)
- Term taxonomy ID.
- $taxonomy(string) (required)
- Taxonomy slug.
WC_Post_Data::edit_term() WC Post Data::edit term code WC 9.7.1
public static function edit_term( $term_id, $tt_id, $taxonomy ) { if ( strpos( $taxonomy, 'pa_' ) === 0 ) { self::$editing_term = get_term_by( 'id', $term_id, $taxonomy ); } else { self::$editing_term = null; } }