$service ) { if ( ! is_array( $service ) ) { continue; } $icon_image = $service['icon'] ?? ''; $name = $service['name'] ?? ''; $price = $service['price'] ?? ''; $tax_price = ( ! empty( $price ) && $price > 0 ) ? ABPRF_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 ) { $abprf_infos['ex_id'] = $id; $sold_qty = ABPRF_Query::get_sold_qty_ex( $abprf_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', ]; ABPRF_Layout::quantity_input( $input_info ); } else { ?>
0 ) { echo wp_kses_post( wc_price( $tax_price ) ); } else { esc_html_e( 'Free', 'abp-rentalforge' ); } if ( $returnable === 'yes' ) { ?>