Tribe__Events__Community__Tickets__Plugin_Register::add_woo_as_dependency_if_able_via_common( array $dependencies )

Add WooCommerce as a co-dependency via filter instead of class property to avoid grammar errors in the notice.

See also #


Top ↑

Parameters #

$dependencies

(array) (Required) An array of dependencies for the plugins. These can include parent, add-on and other dependencies.


Top ↑

Return #

(array)


Top ↑

Source #

File: src/Tribe/Plugin_Register.php

	public function add_woo_as_dependency_if_able_via_common( $dependencies ) {
		if (
			! empty( $GLOBALS['tribe-common-info']['version'] )
			&& -1 !== version_compare( $GLOBALS['tribe-common-info']['version'], '4.9.17' )
			&& is_array( $dependencies )
			&& is_array( $dependencies['co-dependencies'] )
			&& ! in_array( 'WooCommerce', $dependencies['co-dependencies'], true )
		) {
			$dependencies['co-dependencies']['WooCommerce'] = '3.2.0';
		}

		return $dependencies;
	}

Top ↑

Changelog #

Changelog
Version Description
TBD Introduced.