| 1 |
<?php |
| 2 |
|
| 3 |
use TierPricingTable\Forms\Form; |
| 4 |
|
| 5 |
if ( ! defined( 'WPINC' ) ) { |
| 6 |
die; |
| 7 |
} |
| 8 |
|
| 9 |
/** |
| 10 |
* Available variables |
| 11 |
* |
| 12 |
* @var string $role |
| 13 |
* @var string $loop |
| 14 |
* @var string $minimum_order_quantity |
| 15 |
*/ |
| 16 |
|
| 17 |
$placeholder = __( 'Leave blank for no restrictions', 'tier-pricing-table' ); |
| 18 |
$title = !tpt_fs()->can_use_premium_code() ? __( 'Available in premium version', 'tier-pricing-table' ) : ''; |
| 19 |
?> |
| 20 |
|
| 21 |
<p class="form-field tpt_minimum_order_quantity <?php echo esc_attr( ! is_null( $loop ) ? 'form-row' : '' ); ?>"> |
| 22 |
<label for="<?php echo esc_attr( Form::getFieldName( 'minimum_order_quantity', $role, $loop ) ); ?>"> |
| 23 |
<?php esc_html_e( 'Minimum order quantity', 'tier-pricing-table' ); ?> |
| 24 |
</label> |
| 25 |
|
| 26 |
<?php |
| 27 |
echo wp_kses_post( wc_help_tip( __( 'A minimum amount of a product a customer must order to fulfill the order.', |
| 28 |
'tier-pricing-table' ) ) ); |
| 29 |
?> |
| 30 |
|
| 31 |
<input <?php echo ! tpt_fs()->can_use_premium_code() ? 'disabled' : ''; ?> |
| 32 |
type="number" |
| 33 |
class="short" |
| 34 |
title="<?php echo esc_attr( $title ); ?>" |
| 35 |
min="1" |
| 36 |
step="1" |
| 37 |
style="<?php echo esc_attr( tpt_fs()->can_use_premium_code() ? '' : 'cursor: not-allowed' ); ?>" |
| 38 |
placeholder="<?php echo esc_attr( $placeholder ); ?>" |
| 39 |
name="<?php echo esc_attr( Form::getFieldName( 'minimum_order_quantity', $role, $loop ) ); ?>" |
| 40 |
id="<?php echo esc_attr( Form::getFieldName( 'minimum_order_quantity', $role, $loop ) ); ?>" |
| 41 |
value="<?php echo esc_attr( $minimum_order_quantity ); ?>" |
| 42 |
> |
| 43 |
|
| 44 |
</p> |
| 45 |
|