Like [memb_has_any_tag] and [memb_has_all_tags], this shortcode allows you to display or hide content based on the tags that the logged in person has. It allows you to use a single conditional shortcode to test multiple conditions.
This shortcode is based on the “switch” conditional structure found in PHP and other C-based languages. The switch statement is similar to a series of [memb_has_any_tag] or [memb_has_all_tags]. Rather than create many nested structures, you can use a single switch to test for each of these conditions rapidly in order.
The [memb_switch] shortcode executes each test from start to finish. It displays the content following a successful test. If there is content in the [memb_switch] but before one of the tests, then that content will not be displayed.. Only when a [memb_case] shortcode is found with successful test does Memberium process the following content. You can match multiple statements. ONLY
If none of the statements match, then the content following the [else] test will be displayed. This is analogous to a PHP/C “default” condition.
If you are using [memb_switch] and discover that you need an additional check, please contact us at support@memberium.com to discuss how we can help.