You appear to be a bot. Output may be restricted
Description
Display the quantity field for a variable price when multi-purchase mode is enabled
Usage
$void = edd_variable_price_quantity_field( $key, $price, $download_id );
Parameters
- $key
- ( int ) required – Price ID
- $price
- ( array ) required – price option array
- $download_id
- ( int ) required – Download ID
Returns
void
Source
File name: easy-digital-downloads/includes/template-functions.php
Lines:
1 to 22 of 22
function edd_variable_price_quantity_field( $key, $price, $download_id ) { if( ! edd_item_quantities_enabled() || edd_download_quantities_disabled( $download_id ) ) { return; } if( ! edd_single_price_option_mode( $download_id ) ) { return; } ob_start(); ?> <div class="edd_download_quantity_wrapper edd_download_quantity_price_option_<?php echo sanitize_key( $price['name'] ) ?>"> <span class="edd_price_option_sep"> x </span> <input type="number" min="1" step="1" name="edd_download_quantity_<?php echo esc_attr( $key ) ?>" class="edd-input edd-item-quantity" value="1" /> </div> <?php $quantity_input = ob_get_clean(); echo apply_filters( 'edd_purchase_form_variation_quantity_input', $quantity_input, $download_id, $key, $price ); }