Fluent_Crm_Helpers::get_attached_tag_ids( $attachedTagIds )


Parameters Parameters

$attachedTagIds

(Required)


Top ↑

Return Return

(array)


Source Source

File: src/integrations/fluent-crm/helpers/fluent-crm-helpers.php

		 * or pivot ids(table: wp_fc_subscriber_pivot)
		 */
		$list_ids = array();
		if ( ! isset( $_POST['type'] ) ) {
			// the $attachedListIds are actually pivot IDs
			$pivots = SubscriberPivot::whereIn( 'id', $attachedListIds )->get();
			if ( ! empty( $pivots ) ) {
				foreach ( $pivots as $pivot ) {
					$list_ids[] = $pivot->object_id;
				}
			}
		} else {
			$list_ids = $attachedListIds;
		}

		return $list_ids;
	}

	/**
	 * @param $attachedTagIds
	 *