2012-11-27 16:22:47 +00:00
< ? php
2015-01-14 12:17:09 +00:00
/**
2015-11-03 13:53:50 +00:00
* Outputs a variation
2015-01-14 12:17:09 +00:00
*
* @ var int $variation_id
* @ var WP_POST $variation
* @ var array $variation_data array of variation data
*/
2014-09-20 20:05:06 +00:00
if ( ! defined ( 'ABSPATH' ) ) {
2015-01-14 12:17:09 +00:00
exit ;
2014-09-20 20:05:06 +00:00
}
2015-01-14 12:17:09 +00:00
extract ( $variation_data );
2012-10-15 10:32:24 +00:00
?>
2012-10-08 08:59:02 +00:00
< div class = " woocommerce_variation wc-metabox closed " >
< h3 >
2015-07-08 22:08:07 +00:00
< a href = " # " class = " remove_variation delete " rel = " <?php echo esc_attr( $variation_id ); ?> " >< ? php _e ( 'Remove' , 'woocommerce' ); ?> </a>
2015-08-05 18:08:15 +00:00
< div class = " handlediv " title = " <?php esc_attr_e( 'Click to toggle', 'woocommerce' ); ?> " ></ div >
2015-09-15 16:05:52 +00:00
< div class = " tips sort " data - tip = " <?php esc_attr_e( 'Drag and drop, or click to set admin variation order', 'woocommerce' ); ?> " ></ div >
2016-03-10 11:39:32 +00:00
< strong > #<?php echo esc_html( $variation_id ); ?> </strong>
2012-10-08 08:59:02 +00:00
< ? php
foreach ( $parent_data [ 'attributes' ] as $attribute ) {
// Only deal with attributes that are variations
2015-09-01 15:35:13 +00:00
if ( ! $attribute [ 'is_variation' ] || 'false' === $attribute [ 'is_variation' ] ) {
2012-10-08 08:59:02 +00:00
continue ;
2013-12-11 00:36:56 +00:00
}
2012-10-08 08:59:02 +00:00
// Get current value for variation (if set)
2015-06-11 14:42:18 +00:00
$variation_selected_value = isset ( $variation_data [ 'attribute_' . sanitize_title ( $attribute [ 'name' ] ) ] ) ? $variation_data [ 'attribute_' . sanitize_title ( $attribute [ 'name' ] ) ] : '' ;
2012-10-08 08:59:02 +00:00
// Name will be something like attribute_pa_color
2016-10-29 17:32:38 +00:00
/* translators: %s: attribute label */
2016-10-24 07:33:32 +00:00
echo '<select name="attribute_' . sanitize_title ( $attribute [ 'name' ] ) . '[' . $loop . ']"><option value="">' . sprintf ( __ ( 'Any %s…' , 'woocommerce' ), esc_html ( wc_attribute_label ( $attribute [ 'name' ] ) ) ) . '</option>' ;
2012-10-08 08:59:02 +00:00
// Get terms for attribute taxonomy or value if its a custom attribute
if ( $attribute [ 'is_taxonomy' ] ) {
2013-03-07 19:34:29 +00:00
2012-10-08 08:59:02 +00:00
$post_terms = wp_get_post_terms ( $parent_data [ 'id' ], $attribute [ 'name' ] );
2013-03-07 19:34:29 +00:00
2012-10-08 08:59:02 +00:00
foreach ( $post_terms as $term ) {
2015-10-18 16:42:44 +00:00
echo '<option ' . selected ( $variation_selected_value , $term -> slug , false ) . ' value="' . esc_attr ( $term -> slug ) . '">' . esc_html ( apply_filters ( 'woocommerce_variation_option_name' , $term -> name ) ) . '</option>' ;
2012-10-08 08:59:02 +00:00
}
} else {
2013-03-07 19:34:29 +00:00
2015-06-11 13:43:02 +00:00
$options = wc_get_text_attributes ( $attribute [ 'value' ] );
2013-03-07 19:34:29 +00:00
2012-10-08 08:59:02 +00:00
foreach ( $options as $option ) {
2015-07-27 15:43:05 +00:00
$selected = sanitize_title ( $variation_selected_value ) === $variation_selected_value ? selected ( $variation_selected_value , sanitize_title ( $option ), false ) : selected ( $variation_selected_value , $option , false );
2015-07-18 09:34:41 +00:00
echo '<option ' . $selected . ' value="' . esc_attr ( $option ) . '">' . esc_html ( apply_filters ( 'woocommerce_variation_option_name' , $option ) ) . '</option>' ;
2012-10-08 08:59:02 +00:00
}
}
echo '</select>' ;
}
?>
< input type = " hidden " name = " variable_post_id[<?php echo $loop ; ?>] " value = " <?php echo esc_attr( $variation_id ); ?> " />
2015-08-21 13:08:28 +00:00
< input type = " hidden " class = " variation_menu_order " name = " variation_menu_order[<?php echo $loop ; ?>] " value = " <?php echo isset( $menu_order ) ? absint( $menu_order ) : 0; ?> " />
2012-10-08 08:59:02 +00:00
</ h3 >
2015-07-02 20:42:22 +00:00
< div class = " woocommerce_variable_attributes wc-metabox-content " style = " display: none; " >
2014-10-17 11:17:21 +00:00
< div class = " data " >
2014-10-17 13:42:15 +00:00
< p class = " form-row form-row-first upload_image " >
2016-09-02 03:40:52 +00:00
< a href = " # " class = " upload_image_button tips <?php echo ( $_thumbnail_id > 0 ) ? 'remove' : ''; ?> " data - tip = " <?php echo ( $_thumbnail_id > 0 ) ? __( 'Remove this image', 'woocommerce' ) : __( 'Upload an image', 'woocommerce' ); ?> " rel = " <?php echo esc_attr( $variation_id ); ?> " >< img src = " <?php echo ( ! empty( $image ) ) ? esc_attr( $image ) : esc_attr( wc_placeholder_img_src() ); ?> " />< input type = " hidden " name = " upload_image_id[<?php echo $loop ; ?>] " class = " upload_image_id " value = " <?php echo esc_attr( $_thumbnail_id ); ?> " /></ a >
2014-10-17 11:17:21 +00:00
</ p >
< ? php if ( wc_product_sku_enabled () ) : ?>
< p class = " sku form-row form-row-last " >
2016-03-10 11:39:32 +00:00
< label >< ? php _e ( 'SKU' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enter a SKU for this variation or leave blank to use the parent product SKU.', 'woocommerce' ) ); ?></label>
2014-10-17 11:17:21 +00:00
< input type = " text " size = " 5 " name = " variable_sku[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_sku ) ) echo esc_attr( $_sku ); ?> " placeholder = " <?php echo esc_attr( $parent_data['sku'] ); ?> " />
</ p >
< ? php else : ?>
< input type = " hidden " name = " variable_sku[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_sku ) ) echo esc_attr( $_sku ); ?> " />
< ? php endif ; ?>
< p class = " form-row form-row-full options " >
2015-01-14 12:17:09 +00:00
< label >< input type = " checkbox " class = " checkbox " name = " variable_enabled[<?php echo $loop ; ?>] " < ? php checked ( $variation -> post_status , 'publish' ); ?> /> <?php _e( 'Enabled', 'woocommerce' ); ?></label>
2014-10-17 11:17:21 +00:00
2015-10-23 15:09:08 +00:00
< label >< input type = " checkbox " class = " checkbox variable_is_downloadable " name = " variable_is_downloadable[<?php echo $loop ; ?>] " < ? php checked ( isset ( $_downloadable ) ? $_downloadable : '' , 'yes' ); ?> /> <?php _e( 'Downloadable', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enable this option if access is given to a downloadable file upon purchase of a product', 'woocommerce' ) ); ?></label>
2014-10-17 11:17:21 +00:00
2015-10-23 15:09:08 +00:00
< label >< input type = " checkbox " class = " checkbox variable_is_virtual " name = " variable_is_virtual[<?php echo $loop ; ?>] " < ? php checked ( isset ( $_virtual ) ? $_virtual : '' , 'yes' ); ?> /> <?php _e( 'Virtual', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enable this option if a product is not shipped or there is no shipping cost', 'woocommerce' ) ); ?></label>
2014-10-17 11:17:21 +00:00
< ? php if ( get_option ( 'woocommerce_manage_stock' ) == 'yes' ) : ?>
2015-10-23 15:09:08 +00:00
< label >< input type = " checkbox " class = " checkbox variable_manage_stock " name = " variable_manage_stock[<?php echo $loop ; ?>] " < ? php checked ( isset ( $_manage_stock ) ? $_manage_stock : '' , 'yes' ); ?> /> <?php _e( 'Manage stock?', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enable this option to enable stock management at variation level', 'woocommerce' ) ); ?></label>
2014-10-17 11:17:21 +00:00
< ? php endif ; ?>
< ? php do_action ( 'woocommerce_variation_options' , $loop , $variation_data , $variation ); ?>
</ p >
2014-12-23 16:12:12 +00:00
< div class = " variable_pricing " >
2014-10-17 11:17:21 +00:00
< p class = " form-row form-row-first " >
2016-10-29 17:32:38 +00:00
< label >< ? php
/* translators: %s: currency symbol */
printf (
__ ( 'Regular price (%s)' , 'woocommerce' ),
get_woocommerce_currency_symbol ()
);
?> </label>
2015-08-05 18:08:15 +00:00
< input type = " text " size = " 5 " name = " variable_regular_price[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_regular_price ) ) echo esc_attr( $_regular_price ); ?> " class = " wc_input_price " placeholder = " <?php esc_attr_e( 'Variation price (required)', 'woocommerce' ); ?> " />
2014-10-17 11:17:21 +00:00
</ p >
< p class = " form-row form-row-last " >
2016-10-29 17:32:38 +00:00
< label >< ? php
/* translators: %s: currency symbol */
printf (
__ ( 'Sale price (%s)' , 'woocommerce' ),
get_woocommerce_currency_symbol ()
);
?> <a href="#" class="sale_schedule"><?php _e( 'Schedule', 'woocommerce' ); ?></a><a href="#" class="cancel_sale_schedule" style="display:none"><?php _e( 'Cancel schedule', 'woocommerce' ); ?></a></label>
2014-10-17 11:17:21 +00:00
< input type = " text " size = " 5 " name = " variable_sale_price[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_sale_price ) ) echo esc_attr( $_sale_price ); ?> " class = " wc_input_price " />
</ p >
2014-12-23 16:12:12 +00:00
< div class = " sale_price_dates_fields " style = " display: none " >
< p class = " form-row form-row-first " >
2016-03-10 11:39:32 +00:00
< label >< ? php _e ( 'Sale start date' , 'woocommerce' ); ?> </label>
2016-10-24 07:31:07 +00:00
< input type = " text " class = " sale_price_dates_from " name = " variable_sale_price_dates_from[<?php echo $loop ; ?>] " value = " <?php echo ! empty( $_sale_price_dates_from ) ? date_i18n( 'Y-m-d', $_sale_price_dates_from ) : ''; ?> " placeholder = " <?php echo esc_attr__( 'From…', 'woocommerce' ) ?> YYYY-MM-DD " maxlength = " 10 " pattern = " [0-9] { 4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01]) " />
2014-12-23 16:12:12 +00:00
</ p >
< p class = " form-row form-row-last " >
2016-03-10 11:39:32 +00:00
< label >< ? php _e ( 'Sale end date' , 'woocommerce' ); ?> </label>
2016-10-24 07:31:07 +00:00
< input type = " text " class = " sale_price_dates_to " name = " variable_sale_price_dates_to[<?php echo $loop ; ?>] " value = " <?php echo ! empty( $_sale_price_dates_to ) ? date_i18n( 'Y-m-d', $_sale_price_dates_to ) : ''; ?> " placeholder = " <?php echo esc_attr__( 'To…', 'woocommerce' ) ?> YYYY-MM-DD " maxlength = " 10 " pattern = " [0-9] { 4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01]) " />
2014-12-23 16:12:12 +00:00
</ p >
</ div >
2015-10-01 14:30:02 +00:00
< ? php
/**
2015-11-03 12:28:01 +00:00
* woocommerce_variation_options_pricing action .
2015-10-01 14:30:02 +00:00
*
* @ since 2.5 . 0
*
* @ param int $loop
* @ param array $variation_data
* @ param WP_Post $variation
*/
do_action ( 'woocommerce_variation_options_pricing' , $loop , $variation_data , $variation );
?>
2014-10-17 11:17:21 +00:00
</ div >
2014-12-23 16:12:12 +00:00
< ? php if ( 'yes' == get_option ( 'woocommerce_manage_stock' ) ) : ?>
2015-01-02 17:07:31 +00:00
< div class = " show_if_variation_manage_stock " style = " display: none; " >
2014-10-17 11:17:21 +00:00
< p class = " form-row form-row-first " >
2016-03-10 11:39:32 +00:00
< label >< ? php _e ( 'Stock quantity' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enter a quantity to enable stock management at variation level, or leave blank to use the parent product\'s options.', 'woocommerce' ) ); ?></label>
2015-06-12 10:22:54 +00:00
< input type = " number " size = " 5 " name = " variable_stock[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_stock ) ) echo esc_attr( wc_stock_amount( $_stock ) ); ?> " step = " any " />
2014-10-17 11:17:21 +00:00
</ p >
< p class = " form-row form-row-last " >
2016-03-10 11:39:32 +00:00
< label >< ? php _e ( 'Allow backorders?' , 'woocommerce' ); ?> </label>
2014-10-17 11:17:21 +00:00
< select name = " variable_backorders[<?php echo $loop ; ?>] " >
< ? php
foreach ( $parent_data [ 'backorder_options' ] as $key => $value ) {
echo '<option value="' . esc_attr ( $key ) . '" ' . selected ( $key === $_backorders , true , false ) . '>' . esc_html ( $value ) . '</option>' ;
}
?>
</ select >
</ p >
2015-10-01 14:30:02 +00:00
< ? php
/**
2015-12-21 05:36:36 +00:00
* woocommerce_variation_options_inventory action .
2015-10-01 14:30:02 +00:00
*
* @ since 2.5 . 0
*
* @ param int $loop
* @ param array $variation_data
* @ param WP_Post $variation
*/
2015-12-21 05:36:36 +00:00
do_action ( 'woocommerce_variation_options_inventory' , $loop , $variation_data , $variation );
2015-10-01 14:30:02 +00:00
?>
2014-10-17 11:17:21 +00:00
</ div >
< ? php endif ; ?>
2015-07-30 14:45:05 +00:00
< div class = " " >
< p class = " form-row form-row-full " >
2015-10-23 15:09:08 +00:00
< label >< ? php _e ( 'Stock status' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend.', 'woocommerce' ) ); ?></label>
2015-07-30 14:45:05 +00:00
< select name = " variable_stock_status[<?php echo $loop ; ?>] " >
< ? php
foreach ( $parent_data [ 'stock_status_options' ] as $key => $value ) {
echo '<option value="' . esc_attr ( $key === $_stock_status ? '' : $key ) . '" ' . selected ( $key === $_stock_status , true , false ) . '>' . esc_html ( $value ) . '</option>' ;
}
?>
</ select >
</ p >
</ div >
2014-10-17 11:17:21 +00:00
< ? php if ( wc_product_weight_enabled () || wc_product_dimensions_enabled () ) : ?>
< div >
< ? php if ( wc_product_weight_enabled () ) : ?>
< p class = " form-row hide_if_variation_virtual form-row-first " >
2016-10-29 17:32:38 +00:00
< label >< ? php
/* translators: %s: weight unit */
printf (
__ ( 'Weight (%s)' , 'woocommerce' ),
esc_html ( get_option ( 'woocommerce_weight_unit' ) )
);
?> <?php echo wc_help_tip( __( 'Enter a weight for this variation or leave blank to use the parent product weight.', 'woocommerce' ) ); ?></label>
2014-10-17 11:17:21 +00:00
< input type = " text " size = " 5 " name = " variable_weight[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_weight ) ) echo esc_attr( $_weight ); ?> " placeholder = " <?php echo esc_attr( $parent_data['weight'] ); ?> " class = " wc_input_decimal " />
</ p >
2012-10-08 08:59:02 +00:00
< ? php else : ?>
2014-10-17 11:17:21 +00:00
< p >& nbsp ; </ p >
2012-10-08 08:59:02 +00:00
< ? php endif ; ?>
2014-10-17 11:17:21 +00:00
< ? php if ( wc_product_dimensions_enabled () ) : ?>
< p class = " form-row dimensions_field hide_if_variation_virtual form-row-last " >
2016-10-29 17:32:38 +00:00
< label for = " product_length " >< ? php
/* translators: %s: dimension unit */
printf (
__ ( 'Dimensions (L×W×H) (%s)' , 'woocommerce' ),
get_option ( 'woocommerce_dimension_unit' )
);
?> </label>
2014-10-17 11:17:21 +00:00
< input id = " product_length " class = " input-text wc_input_decimal " size = " 6 " type = " text " name = " variable_length[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_length ) ) echo esc_attr( $_length ); ?> " placeholder = " <?php echo esc_attr( $parent_data['length'] ); ?> " />
< input class = " input-text wc_input_decimal " size = " 6 " type = " text " name = " variable_width[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_width ) ) echo esc_attr( $_width ); ?> " placeholder = " <?php echo esc_attr( $parent_data['width'] ); ?> " />
< input class = " input-text wc_input_decimal last " size = " 6 " type = " text " name = " variable_height[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_height ) ) echo esc_attr( $_height ); ?> " placeholder = " <?php echo esc_attr( $parent_data['height'] ); ?> " />
</ p >
< ? php else : ?>
< p >& nbsp ; </ p >
2014-06-19 15:47:04 +00:00
< ? php endif ; ?>
2015-10-01 14:30:02 +00:00
< ? php
/**
2015-12-21 05:36:36 +00:00
* woocommerce_variation_options_dimensions action .
2015-10-01 14:30:02 +00:00
*
* @ since 2.5 . 0
*
* @ param int $loop
* @ param array $variation_data
* @ param WP_Post $variation
*/
2015-12-21 05:36:36 +00:00
do_action ( 'woocommerce_variation_options_dimensions' , $loop , $variation_data , $variation );
2015-10-01 14:30:02 +00:00
?>
2014-10-17 11:17:21 +00:00
</ div >
< ? php endif ; ?>
< div >
2016-03-10 11:39:32 +00:00
< p class = " form-row hide_if_variation_virtual form-row-full " >< label >< ? php _e ( 'Shipping class' , 'woocommerce' ); ?> </label> <?php
2014-10-17 11:17:21 +00:00
$args = array (
'taxonomy' => 'product_shipping_class' ,
'hide_empty' => 0 ,
'show_option_none' => __ ( 'Same as parent' , 'woocommerce' ),
'name' => 'variable_shipping_class[' . $loop . ']' ,
'id' => '' ,
'selected' => isset ( $shipping_class ) ? esc_attr ( $shipping_class ) : '' ,
2016-08-27 01:46:45 +00:00
'echo' => 0 ,
2014-10-17 11:17:21 +00:00
);
echo wp_dropdown_categories ( $args );
?> </p>
2015-05-29 13:55:54 +00:00
< ? php if ( wc_tax_enabled () ) : ?>
< p class = " form-row form-row-full " >
2016-03-10 11:39:32 +00:00
< label >< ? php _e ( 'Tax class' , 'woocommerce' ); ?> </label>
2015-05-29 13:55:54 +00:00
< select name = " variable_tax_class[<?php echo $loop ; ?>] " >
< option value = " parent " < ? php selected ( is_null ( $_tax_class ), true ); ?> ><?php _e( 'Same as parent', 'woocommerce' ); ?></option>
< ? php
foreach ( $parent_data [ 'tax_class_options' ] as $key => $value )
echo '<option value="' . esc_attr ( $key ) . '" ' . selected ( $key === $_tax_class , true , false ) . '>' . esc_html ( $value ) . '</option>' ;
?> </select>
</ p >
2015-10-01 14:30:02 +00:00
< ? php
/**
2015-12-21 05:36:36 +00:00
* woocommerce_variation_options_tax action .
2015-10-01 14:30:02 +00:00
*
* @ since 2.5 . 0
*
* @ param int $loop
* @ param array $variation_data
* @ param WP_Post $variation
*/
2015-12-21 05:36:36 +00:00
do_action ( 'woocommerce_variation_options_tax' , $loop , $variation_data , $variation );
2015-10-01 14:30:02 +00:00
?>
2015-05-29 13:55:54 +00:00
< ? php endif ; ?>
2015-11-28 15:20:47 +00:00
</ div >
< div >
2015-05-14 17:56:26 +00:00
< p class = " form-row form-row-full " >
2016-03-10 11:39:32 +00:00
< label >< ? php _e ( 'Variation description' , 'woocommerce' ); ?> </label>
2015-05-28 23:08:22 +00:00
< textarea name = " variable_description[<?php echo $loop ; ?>] " rows = " 3 " style = " width:100%; " >< ? php echo isset ( $variation_data [ '_variation_description' ] ) ? esc_textarea ( $variation_data [ '_variation_description' ] ) : '' ; ?> </textarea>
2015-05-14 17:56:26 +00:00
</ p >
2014-10-17 11:17:21 +00:00
</ div >
2015-01-02 17:07:31 +00:00
< div class = " show_if_variation_downloadable " style = " display: none; " >
2014-10-17 11:17:21 +00:00
< div class = " form-row form-row-full downloadable_files " >
2016-03-10 11:39:32 +00:00
< label >< ? php _e ( 'Downloadable files' , 'woocommerce' ); ?> </label>
2014-10-17 11:17:21 +00:00
< table class = " widefat " >
< thead >
< div >
2015-10-23 15:09:08 +00:00
< th >< ? php _e ( 'Name' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the name of the download shown to the customer.', 'woocommerce' ) ); ?></th>
< th colspan = " 2 " >< ? php _e ( 'File URL' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the URL or absolute path to the file which customers will get access to. URLs entered here should already be encoded.', 'woocommerce' ) ); ?></th>
2014-10-17 11:17:21 +00:00
< th >& nbsp ; </ th >
</ div >
</ thead >
< tbody >
< ? php
if ( $_downloadable_files ) {
foreach ( $_downloadable_files as $key => $file ) {
if ( ! is_array ( $file ) ) {
$file = array (
'file' => $file ,
2016-08-27 01:46:45 +00:00
'name' => '' ,
2014-10-17 11:17:21 +00:00
);
}
include ( 'html-product-variation-download.php' );
}
}
?>
</ tbody >
< tfoot >
< div >
< th colspan = " 4 " >
< a href = " # " class = " button insert " data - row = " <?php
$file = array (
'file' => '' ,
2016-08-27 01:46:45 +00:00
'name' => '' ,
2014-10-17 11:17:21 +00:00
);
ob_start ();
include ( 'html-product-variation-download.php' );
echo esc_attr ( ob_get_clean () );
2016-10-12 10:16:30 +00:00
?> "><?php _e( 'Add file', 'woocommerce' ); ?></a>
2014-10-17 11:17:21 +00:00
</ th >
</ div >
</ tfoot >
</ table >
</ div >
</ div >
2015-01-02 17:07:31 +00:00
< div class = " show_if_variation_downloadable " style = " display: none; " >
2014-10-17 11:17:21 +00:00
< p class = " form-row form-row-first " >
2016-10-29 17:32:38 +00:00
< label >< ? php _e ( 'Download limit' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Leave blank for unlimited re-downloads.', 'woocommerce' ) ); ?></label>
2015-08-05 18:08:15 +00:00
< input type = " number " size = " 5 " name = " variable_download_limit[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_download_limit ) ) echo esc_attr( $_download_limit ); ?> " placeholder = " <?php esc_attr_e( 'Unlimited', 'woocommerce' ); ?> " step = " 1 " min = " 0 " />
2014-10-17 11:17:21 +00:00
</ p >
< p class = " form-row form-row-last " >
2016-10-29 17:32:38 +00:00
< label >< ? php _e ( 'Download expiry' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enter the number of days before a download link expires, or leave blank.', 'woocommerce' ) ); ?></label>
2015-08-05 18:08:15 +00:00
< input type = " number " size = " 5 " name = " variable_download_expiry[<?php echo $loop ; ?>] " value = " <?php if ( isset( $_download_expiry ) ) echo esc_attr( $_download_expiry ); ?> " placeholder = " <?php esc_attr_e( 'Unlimited', 'woocommerce' ); ?> " step = " 1 " min = " 0 " />
2014-10-17 11:17:21 +00:00
</ p >
2015-10-01 14:30:02 +00:00
< ? php
/**
2015-12-21 05:36:36 +00:00
* woocommerce_variation_options_download action .
2015-10-01 14:30:02 +00:00
*
* @ since 2.5 . 0
*
* @ param int $loop
* @ param array $variation_data
* @ param WP_Post $variation
*/
2015-12-21 05:36:36 +00:00
do_action ( 'woocommerce_variation_options_download' , $loop , $variation_data , $variation );
2015-10-01 14:30:02 +00:00
?>
2014-10-17 11:17:21 +00:00
</ div >
< ? php do_action ( 'woocommerce_product_after_variable_attributes' , $loop , $variation_data , $variation ); ?>
</ div >
</ div >
2012-10-08 08:59:02 +00:00
</ div >