Skip to content

Commit 6172f4b

Browse files
authored
hide products with no subscription options
1 parent e844c3b commit 6172f4b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

inc/plugins/rexshop.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ function rexshop_payment_page()
257257
foreach ($product['prices'] as $price) {
258258
$options .= '<option value="' . $price['plan_id'] . '">' . $price['name'] . ' ' . $price['currency'] . $price['price'] . ' (' . $price['time'] . ' ' . $price['duration'] . ')</option>';
259259
}
260+
261+
if (empty($options)) {
262+
continue;
263+
}
260264

261265
$payments .= '
262266
<fieldset>
@@ -276,10 +280,10 @@ function rexshop_payment_page()
276280
</form>
277281
</div>
278282
</fieldset>';
279-
280-
if (empty($payments)) {
281-
$payments = '<p style="text-align: center;">' . $lang->no_subscription_options . '</p>';
282-
}
283+
}
284+
285+
if (empty($payments)) {
286+
$payments = '<p style="text-align: center;">' . $lang->no_subscription_options . '</p>';
283287
}
284288

285289
$contents .= "

0 commit comments

Comments
 (0)