Skip to content

Commit

Permalink
hide products with no subscription options
Browse files Browse the repository at this point in the history
  • Loading branch information
srexi committed May 11, 2022
1 parent e844c3b commit 6172f4b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions inc/plugins/rexshop.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ function rexshop_payment_page()
foreach ($product['prices'] as $price) {
$options .= '<option value="' . $price['plan_id'] . '">' . $price['name'] . ' ' . $price['currency'] . $price['price'] . ' (' . $price['time'] . ' ' . $price['duration'] . ')</option>';
}

if (empty($options)) {
continue;
}

$payments .= '
<fieldset>
Expand All @@ -276,10 +280,10 @@ function rexshop_payment_page()
</form>
</div>
</fieldset>';

if (empty($payments)) {
$payments = '<p style="text-align: center;">' . $lang->no_subscription_options . '</p>';
}
}

if (empty($payments)) {
$payments = '<p style="text-align: center;">' . $lang->no_subscription_options . '</p>';
}

$contents .= "
Expand Down

0 comments on commit 6172f4b

Please sign in to comment.