Function: tcp the add to cart unit field

Description

“tcp_the_add_to_cart_unit_field” function allows to display the unit text field in the buy button area.

Usage

<?php tcp_the_add_to_cart_unit_field( $post_id, $units, $hidden, $echo ); ?>

Parameters

$post_id 
(Numeric) Identifier of the Post ID of the Product associated with this unit field.
$units
(Numeric) Initial value to show in the unit field. The default value is 1.
$hidden
(Boolean) Allow to create the field hidden or visible. The default value is false (visible).
$echo
(Boolean) Displays the html containing the unit field or returns the html. The default value is true (display).

Examples

Related

tcp_the_add_to_cart_button