Created
October 20, 2021 17:34
-
-
Save DumahX/44fbc3479de57673d4106e934fcb9c8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(!defined('ABSPATH')) {die('You are not allowed to call this page directly.');} ?> | |
<?php | |
$products = $group->products(); | |
$check_products = array(); | |
$credit_card_products = array(); | |
// Find credit card and check memberships. | |
if(!empty($products)) { | |
foreach($products as $product) { | |
if(strpos(strtolower($product->post_title), 'CHECK TEXT HERE') !== false) { | |
$check_products[] = $product; | |
} else { | |
$credit_card_products[] = $product; | |
} | |
} | |
} | |
$group_theme = preg_replace('~\.css$~', '', (is_null($theme) ? $group->group_theme : $theme)); | |
$group_template = $group->group_template(); | |
?> | |
<div class="mepr-price-menu <?php echo $group_theme; ?> <?php echo $group_template; ?>"> | |
<?php if(!empty($check_products)): ?> | |
<div class="mepr-price-boxes-check"> | |
<div class="mepr-price-boxes mepr-<?php echo count($check_products); ?>-col"> | |
<?php | |
foreach($check_products as $product) { | |
MeprGroupsHelper::group_page_item($product, $group); | |
} | |
?> | |
</div> | |
</div> | |
<?php endif; ?> | |
<?php if(!empty($credit_card_products)): ?> | |
<div class="mepr-price-boxes-credit-card"> | |
<div class="mepr-price-boxes mepr-<?php echo count($credit_card_products); ?>-col"> | |
<?php | |
foreach($credit_card_products as $product) { | |
MeprGroupsHelper::group_page_item($product, $group); | |
} | |
?> | |
</div> | |
</div> | |
<?php endif; ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment