'; print_r($additional_services); echo ''; if (!empty($additional_services) && is_array($additional_services)) { $ex_count = 0; $post_id = absint($post_infos['post_id'] ?? 0); ?>
$service) { if (!is_array($service)) { continue; } $icon_image = $service['icon'] ?? ''; $name = $service['name'] ?? ''; $price = $service['price'] ?? ''; $tax_price = (!empty($price) && $price > 0) ? ABPET_Function::tax_with_price($post_id, $price) : 0; $qty = $service['qty'] ?? ''; $max_qty = $service['max_qty'] ?? ''; $returnable = $service['returnable'] ?? 'no'; $description = $service['description'] ?? ''; if (empty($qty)) { $qty = !empty($max_qty) ? $max_qty : 9999; } $sold_qty = 0; if ($qty < 9999) { $post_infos['ex_id'] = $id; $sold_qty = ABPET_Query::get_sold_qty_ex($post_infos); } $available = $qty - $sold_qty; $max_qty = !empty($max_qty) ? min($max_qty, $available) : $available; if ($ex_count > 0) { ?>
0) { ?> 'qty_' . $id, 'price' => $tax_price, 'min_qty' => 0, 'max_qty' => $max_qty, 'class' => 'ex_price_calculate', ]; ABPET_Layout::quantity_input($input_info); } else { ?>
0) { echo wp_kses_post(wc_price($tax_price)); } else { esc_html_e('Free', 'abp-event-ticket'); } if ($returnable === 'yes') { ?>