Fluent_Crm_Helpers::get_subscriber_statuses()

Get all formatted statuses.

Contents


Return Return

(array) The list of subscribers statuses.


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', $attachedTagIds )->get();
			if ( ! empty( $pivots ) ) {
				foreach ( $pivots as $pivot ) {
					$list_ids[] = $pivot->object_id;
				}
			}
		} else {
			$list_ids = $attachedTagIds;
		}

		return $list_ids;
	}

	/**
	 * Get all formatted statuses.
	 *
	 * @return array The list of subscribers statuses.
	 */
	public function get_subscriber_statuses() {

		if ( ! function_exists( 'fluentcrm_subscriber_statuses' ) ) {
			return array();