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/Frontend/Adapters/HorizontalTableAdapter.php +8 -1 7.1.4 → 8.0.2 View file →
@@ -17,10 +17,16 @@
17 17
18 18 $productId = $pricingRule->getProductId();
19 19
20 20 $hasQty = ! empty( $settings['quantity_column_title'] ) || ! isset( $settings['quantity_column_title'] );
21 - $hasDiscount = ! empty( $settings['discount_column_title'] ) || ! empty( $settings['show_discount_column'] );
21 + $hasDiscount = ! empty( $settings['discount_column_title'] ); // the layout draws the discount row from its header only
22 22 $hasPrice = ! empty( $settings['price_column_title'] ) || ! isset( $settings['price_column_title'] );
23 +
24 + // one empty cell per custom column, so the column keeps the grid's row count
25 + ob_start();
26 + do_action( 'tiered_pricing_table/tiered_pricing/header_columns', $pricingRule );
27 + $customColumns = substr_count( (string) ob_get_clean(), '<th' );
28 +
23 29 ServiceContainer::getInstance()->getFileManager()->includeTemplate(
24 30 'frontend/integrated/horizontal-table.php',
25 31 array(
26 32 'form' => $form,
@@ -27,8 +33,9 @@
27 33 'productId' => $productId,
28 34 'hasQty' => $hasQty,
29 35 'hasDiscount' => $hasDiscount,
30 36 'hasPrice' => $hasPrice,
37 + 'customColumns' => $customColumns,
31 38 'buttonHtml' => $this->getQuoteButtonHtml( $form, $productId, 'button wp-element-button', 'padding: 5px 10px;margin:0', 'tpt-raq-table' )
32 39 ),
33 40 plugin_dir_path( dirname( __DIR__ ) ) . 'views/'
34 41 );