Upload via Git Manager GUI
This commit is contained in:
@@ -495,8 +495,8 @@ class WIS_Activator {
|
|||||||
'response' => json_encode([
|
'response' => json_encode([
|
||||||
'commands' => [[
|
'commands' => [[
|
||||||
'type' => 'fly_abo',
|
'type' => 'fly_abo',
|
||||||
'days' => 30,
|
|
||||||
'label' => $sub->label,
|
'label' => $sub->label,
|
||||||
|
'price' => $sub->price,
|
||||||
]],
|
]],
|
||||||
]),
|
]),
|
||||||
]);
|
]);
|
||||||
@@ -3686,9 +3686,9 @@ class WIS_API {
|
|||||||
$abo_days = intval($cmd['days'] ?? 30);
|
$abo_days = intval($cmd['days'] ?? 30);
|
||||||
$abo_label = sanitize_text_field($cmd['label'] ?? 'Fly-Abo');
|
$abo_label = sanitize_text_field($cmd['label'] ?? 'Fly-Abo');
|
||||||
$abo_price = 0;
|
$abo_price = 0;
|
||||||
// Preis aus dem Warenkorb ermitteln (erstes passendes fly_abo Item)
|
// Preis aus dem Warenkorb ermitteln (fly_abo mit oder ohne Zahl-Suffix)
|
||||||
foreach ($valid_cart as $ci) {
|
foreach ($valid_cart as $ci) {
|
||||||
if (preg_match('/^fly_abo_\d+$/', $ci['id'])) {
|
if ($ci['id'] === 'fly_abo' || preg_match('/^fly_abo/', $ci['id'])) {
|
||||||
$abo_price = intval($ci['price'] ?? 0);
|
$abo_price = intval($ci['price'] ?? 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user