PluginProbe
Tiered Pricing Table for WooCommerce / 2.0
Tiered Pricing Table for WooCommerce v2.0
8.0.2 7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 All 91 releases
← All changes | views/frontend/price-table-fixed.php +11 -25 2.1.1 → 2.0 View file →
@@ -19,25 +19,17 @@
19 19
20 20 <table class="shop_table price-rules-table <?php echo $settings['table_css_class'] ?>" data-price-rules-table
21 21 data-product-id="<?php echo $product_id; ?>"
22 22 data-price-rules="<?php echo htmlspecialchars( json_encode( $price_rules ) ); ?>">
23 + <thead>
24 + <tr>
25 + <th><span class="nobr"><?php echo sanitize_text_field( $settings['head_quantity_text'] ); ?></span></th>
26 + <th><span class="nobr"><?php echo sanitize_text_field( $settings['head_price_text'] ); ?></span></th>
27 + </tr>
28 + </thead>
23 29
24 - <?php if ( $settings['head_quantity_text'] != '' && $settings['head_price_text'] != '' ): ?>
25 - <thead>
26 - <tr>
27 - <th><span class="nobr"><?php echo sanitize_text_field( $settings['head_quantity_text'] ); ?></span>
28 - </th>
29 - <th><span class="nobr"><?php echo sanitize_text_field( $settings['head_price_text'] ); ?></span>
30 - </th>
31 - </tr>
32 - </thead>
33 - <?php endif; ?>
34 -
35 30 <tbody>
36 - <tr data-price-rules-amount="1"
37 - data-price-rules-price="<?php echo wc_get_price_to_display( wc_get_product( $product_id ), [
38 - 'price' => $real_price,
39 - ] ); ?>" data-price-rules-row>
31 + <tr data-price-rules-amount="1" data-price-rules-price="<?php echo $real_price ?>" data-price-rules-row>
40 32 <td>
41 33 <?php if ( 1 === array_keys( $price_rules )[0] - 1 ): ?>
42 34 <span>1</span>
43 35 <?php else: ?>
@@ -44,11 +36,9 @@
44 36 <span>1 - <?php echo array_keys( $price_rules )[0] - 1; ?></span>
45 37 <?php endif; ?>
46 38 </td>
47 39 <td>
48 - <span data-price-rules-formated-price><?php echo wc_price( wc_get_price_to_display( wc_get_product( $product_id ), [
49 - 'price' => $real_price,
50 - ] ) ); ?></span>
40 + <span data-price-rules-formated-price><?php echo wc_price( $real_price ); ?></span>
51 41 </td>
52 42 </tr>
53 43
54 44 <?php $iterator = new ArrayIterator( $price_rules ); ?>
@@ -70,18 +60,14 @@
70 60 $quantity = $current_quantity . '+';
71 61 }
72 62 ?>
73 63 <tr data-price-rules-amount="<?php echo $current_quantity ?>"
74 - data-price-rules-price="<?php echo wc_get_price_to_display( wc_get_product( $product_id ), [
75 - 'price' => $current_price,
76 - ] ); ?>" data-price-rules-row>
64 + data-price-rules-price="<?php echo $current_price ?>" data-price-rules-row>
77 65 <td>
78 66 <span><?php echo $quantity ?></span>
79 67 </td>
80 68 <td>
81 - <span data-price-rules-formated-price><?php echo wc_price( wc_get_price_to_display( wc_get_product( $product_id ), [
82 - 'price' => $current_price,
83 - ] ) ); ?></span>
69 + <span data-price-rules-formated-price><?php echo wc_price( $current_price ) ?></span>
84 70 </td>
85 71 </tr>
86 72 <?php endwhile; ?>
87 73
@@ -97,8 +83,8 @@
97 83 background-color: <?php echo $settings['selected_quantity_color'] ?> !important;
98 84 }
99 85
100 86 .price-rules-table-wrapper {
101 - <?php echo $settings['display_type'] === 'tooltip' ? 'display: none; ' : ''; ?>
87 + <?php echo $settings['display_type'] === 'tooltip' ? 'display: none; ' : ''; ?>
102 88 }
103 89 </style>
104 90 <?php endif; ?>