Add_Gtw_Integration::plugin_active( $status,  $code )

Only load this integration and its triggers and actions if the related plugin is active


Parameters Parameters

$status

(Required)

$code

(Required)


Top ↑

Return Return

(bool)


Source Source

File: src/integrations/gotowebinar/add-gtw-integration.php

	public function plugin_active( $status, $code ) {
		$is_enabled = true;
		$directories = array(
			'wp-content',
			'plugins',
			'uncanny-automator-pro',
			'src',
			'integrations',
			'gotowebinar',
			'helpers',
		);
		$pro_integration_helpers_path = ABSPATH . implode( DIRECTORY_SEPARATOR, $directories ) . '/gotowebinar-pro-helpers.php';
		// If the helper file exists in pro it means, the pro version still contains the old helper file.
		if ( file_exists( $pro_integration_helpers_path ) && is_automator_pro_active() ) {
			$is_enabled = false;
		}
		return $is_enabled;
	}