Optinmonster_Helpers::campaign_is_active( $campaign_id )

campaign_is_active


Parameters Parameters

$campaign

(Required)


Top ↑

Return Return

(boolean)


Source Source

File: src/integrations/optinmonster/helpers/optinmonster-helpers.php

	public function campaign_is_active( $campaign_id ) {

		$omapi = OMAPI::get_instance();

		$om_campaigns = $omapi->get_campaigns();

		$options = array();

		foreach ( $om_campaigns as $campaign ) {

			if ( $campaign_id === $campaign->post_name ) {

				if ( false === $campaign->enabled ) {
					return false;
				}

				return true;
			}
		}

		return false;
	}