Tribe__Events__Community__Tickets__Main::is_enabled()

Returns whether or not community tickets is enabled in settings

Topics


Source #

File: src/Tribe/Main.php

	public function is_enabled() {
		$options = get_option( self::OPTIONNAME );

		if ( empty( $options['enable_community_tickets'] ) ) {
			return false;
		}

		if (
			! empty( $options['enable_split_payments'] )
			&& (
				empty( $options['paypal_api_username'] )
				|| empty( $options['paypal_api_password'] )
				|| empty( $options['paypal_api_signature'] )
				|| empty( $options['paypal_application_id'] )
				|| empty( $options['paypal_receiver_email'] )
				|| empty( $options['paypal_invoice_prefix'] )
			)
		) {
			return false;
		}

		return true;
	}