Inventory_Presser_Taxonomy_Overlapper::check_for_remaining_term_relationship( mixed $object_id, mixed $taxonomy, mixed $term )


Description Description

A meta value was just deleted after a term relationship was deleted.<br>Check for another term relationship in the same taxonomy. A user could have marked a vehicle as both an Acura and Audi by mistake, and removed one. We want to make sure the meta value contains the remaining term name.

Top ↑

Parameters Parameters


(mixed) (Required)


(mixed) (Required)


(mixed) (Required)

Top ↑

Return Return


Top ↑

Source Source

File: includes/class-taxonomy-overlapper.php

	public function check_for_remaining_term_relationship( $object_id, $taxonomy, $term ) {
		$terms = wp_get_object_terms( $object_id, $taxonomy );
		if ( empty( $terms ) ) {

		$taxonomies_and_keys = array_flip( $this->overlapping_meta_keys() );

		update_post_meta( $object_id, apply_filters( 'invp_prefix_meta_key', $taxonomies_and_keys[ $taxonomy ] ), $terms[0]->name );