Tribe__Tickets__Commerce__PayPal__Main::deprioritize_module( string $default_module, string[] $available_modules )
If other modules are active, we should deprioritize 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/Tribe/Commerce/PayPal/Main.php
public function deprioritize_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 deprioritize
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 |
|---|---|
| 4.7.1 | Introduced. |