Inventory_Presser_Plugin::save_vehicle_taxonomy_terms( int $post_id, bool $is_update )

Saves custom taxonomy terms when vehicles are saved


Parameters Parameters

$post_id

(int) (Required) A post ID.

$is_update

(bool) (Required) True if this is a post update rather than an insert.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: inventory-presser.php

		public function save_vehicle_taxonomy_terms( $post_id, $is_update ) {
			foreach ( Inventory_Presser_Taxonomies::slugs_array() as $slug ) {
				$taxonomy_name = $slug;
				switch ( $slug ) {
					case 'style':
						$slug = 'body_style';
						break;
					case 'model_year':
						$slug = 'year';
						break;
				}
				Inventory_Presser_Taxonomies::save_taxonomy_term( $post_id, $taxonomy_name, apply_filters( 'invp_prefix_meta_key', $slug ) );
			}
		}