Hooks::filter_de_prioritize_module( string $default_module, string[] $available_modules )
If other modules are active, we should de prioritize this one (we want other commerce modules to take priority over this one).
Contents
Parameters
- $default_module
-
(string) (Required)
- $available_modules
-
(string[]) (Required)
Return
(string)
Source
File: src/Tickets/Commerce/Hooks.php
public function filter_de_prioritize_module( $default_module, array $available_modules ) {
$tribe_commerce_module = get_class( $this );
// If this isn't the default (or if there isn't a choice), no need to de prioritize.
if (
$default_module !== $tribe_commerce_module
|| count( $available_modules ) < 2
|| reset( $available_modules ) !== $tribe_commerce_module
) {
return $default_module;
}
return next( $available_modules );
}
Changelog
| Version | Description |
|---|---|
| 5.1.9 | Introduced. |