← All changes
|
views/admin/components/minimum-order-quantity-form.php
+8
-6
6.4.0
→
8.0.2
View file →
| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | - | |
| 2 | + | |
| 3 | 3 | use TierPricingTable\Forms\Form; |
| 4 | - | |
| 4 | + | |
| 5 | 5 | if ( ! defined( 'WPINC' ) ) { |
| 6 | 6 | die; |
| 7 | 7 | } |
| 8 | - | |
| 8 | + | |
| 9 | 9 | /** |
| 10 | 10 | * Available variables |
| 11 | 11 | * |
| 12 | 12 | * @var string $role |
| @@ -12,10 +12,11 @@ | ||
| 12 | 12 | * @var string $role |
| 13 | 13 | * @var string $loop |
| 14 | 14 | * @var string $minimum_order_quantity |
| 15 | 15 | */ |
| 16 | - | |
| 16 | + | |
| 17 | 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' ) : ''; | |
| 18 | 19 | ?> |
| 19 | 20 | |
| 20 | 21 | <p class="form-field tpt_minimum_order_quantity <?php echo esc_attr( ! is_null( $loop ) ? 'form-row' : '' ); ?>"> |
| 21 | 22 | <label for="<?php echo esc_attr( Form::getFieldName( 'minimum_order_quantity', $role, $loop ) ); ?>"> |
| @@ -20,17 +21,18 @@ | ||
| 20 | 21 | <p class="form-field tpt_minimum_order_quantity <?php echo esc_attr( ! is_null( $loop ) ? 'form-row' : '' ); ?>"> |
| 21 | 22 | <label for="<?php echo esc_attr( Form::getFieldName( 'minimum_order_quantity', $role, $loop ) ); ?>"> |
| 22 | 23 | <?php esc_html_e( 'Minimum order quantity', 'tier-pricing-table' ); ?> |
| 23 | 24 | </label> |
| 24 | - | |
| 25 | + | |
| 25 | 26 | <?php |
| 26 | 27 | echo wp_kses_post( wc_help_tip( __( 'A minimum amount of a product a customer must order to fulfill the order.', |
| 27 | - 'tier-pricing-table' ) ) ); | |
| 28 | + 'tier-pricing-table' ) ) ); | |
| 28 | 29 | ?> |
| 29 | 30 | |
| 30 | 31 | <input <?php echo ! tpt_fs()->can_use_premium_code() ? 'disabled' : ''; ?> |
| 31 | 32 | type="number" |
| 32 | 33 | class="short" |
| 34 | + title="<?php echo esc_attr( $title ); ?>" | |
| 33 | 35 | min="1" |
| 34 | 36 | step="1" |
| 35 | 37 | style="<?php echo esc_attr( tpt_fs()->can_use_premium_code() ? '' : 'cursor: not-allowed' ); ?>" |
| 36 | 38 | placeholder="<?php echo esc_attr( $placeholder ); ?>" |