Skip to content

Commit 4e0a89d

Browse files
committed
Merge branch 'fix/validation-to-the-product-countdown-timer-discount-percentage-field' into release/v2.0
2 parents 8b52e14 + dd46213 commit 4e0a89d

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

Includes/Modules/CountdownTimer/templates/wc-product-data-panels.php

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,21 @@
1616
?>
1717
<div id="sgsb-countdown-timer-tab" class="panel woocommerce_options_panel hidden">
1818
<div class="options_group">
19-
<?php
20-
woocommerce_wp_text_input(
21-
array(
22-
'id' => '_sgsb_countdown_timer_discount_amount',
23-
'label' => __( 'Product Discount (%)', 'storegrowth-sales-booster' ),
24-
'placeholder' => 'Set the discount as percentage.',
25-
'desc_tip' => true,
26-
'description' => __( 'Set the countdown timer discount as percentage.', 'storegrowth-sales-booster' ),
27-
)
28-
);
19+
<?php
20+
woocommerce_wp_text_input(
21+
[
22+
'id' => '_sgsb_countdown_timer_discount_amount',
23+
'label' => __( 'Product Discount (%)', 'storegrowth-sales-booster' ),
24+
'placeholder' => 'Set the discount as percentage.',
25+
'desc_tip' => true,
26+
'description' => __( 'Set the countdown timer discount as percentage.', 'storegrowth-sales-booster' ),
27+
'type' => 'number',
28+
'custom_attributes' => [
29+
'min' => '0',
30+
'max' => '100',
31+
],
32+
]
33+
);
2934
?>
3035
<p class="form-field sale_price_dates_fields" style="margin-bottom: 0;">
3136
<label>

0 commit comments

Comments
 (0)