PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
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 | src/Addons/RequestAQuote/views/frontend/integrated/table.php +7 -2 7.1.7 → 8.0.2 View file →
@@ -9,8 +9,10 @@
9 9 * @var bool $isDivTable
10 10 * @var bool $hasQty
11 11 * @var bool $hasPrice
12 12 * @var bool $hasDiscount
13 + * @var int $columns every column of the table, custom columns included
14 + * @var int $span columns the button cell covers (everything after the quantity cell)
13 15 * @var string $buttonHtml
14 16 */
15 17 if ( ! defined( 'ABSPATH' ) ) {
16 18 exit;
@@ -15,11 +17,14 @@
15 17 if ( ! defined( 'ABSPATH' ) ) {
16 18 exit;
17 19 }
18 20
21 +// templates copied before the custom-columns fix pass no span; behave as they did
22 +$span = isset( $span ) ? (int) $span : ( ! empty( $hasDiscount ) ? 2 : 1 );
23 +
19 24 if ( $isDivTable ) : ?>
20 25 <div class="tiered-pricing-table-row tpt-request-quote-integrated-row"
21 - style="cursor: pointer; grid-template-columns: 1fr 2fr;"
26 + style="cursor: pointer; grid-template-columns: <?php echo esc_attr( $hasQty ? '1fr ' . $span . 'fr' : '1fr' ); ?>;"
22 27 onclick="document.getElementById('tpt-raq-table-<?php echo esc_attr( $productId ); ?>').click();">
23 28 <?php if ( $hasQty ) : ?>
24 29 <div class="tiered-pricing-table__quantity">
25 30 <span class="tiered-pricing-table-row-qty">
@@ -46,9 +51,9 @@
46 51 </span>
47 52 </td>
48 53 <?php endif; ?>
49 54 <?php if ( $hasPrice ) : ?>
50 - <td class="tiered-pricing-table__price" <?php echo esc_attr($hasDiscount) ? 'colspan="2"' : ''; ?> style="text-align: right">
55 + <td class="tiered-pricing-table__price" <?php echo $span > 1 ? 'colspan="' . (int) $span . '"' : ''; ?> style="text-align: right">
51 56 <span>
52 57 <?php echo wp_kses_post($buttonHtml); ?>
53 58 </span>
54 59 </td>