get_sale_price(); if ( $sale_price ) { $sale_price = wc_get_price_to_display( $product, array( 'price' => $sale_price, ) ); } $regular_price = wc_get_price_to_display( $product, array( 'price' => $product->get_regular_price(), ) ); $price = wc_get_price_to_display( $product, array( 'price' => $product->get_price(), ) ); $price_incl_taxes = wc_get_price_including_tax( wc_get_product( $product_id ), array( 'price' => $real_price, ) ); $price_excl_taxes = wc_get_price_excluding_tax( wc_get_product( $product_id ), array( 'price' => $real_price, ) ); $num_rows = 0; if ( $settings['quantity_column_title'] ) $num_rows++; if ( $settings['discount_column_title'] ) $num_rows++; if ( $settings['price_column_title'] ) $num_rows++; // Detect custom columns via output buffering ob_start(); do_action( 'tiered_pricing_table/tiered_pricing/header_columns', $pricing_rule ); $custom_head = ob_get_clean(); $custom_columns_count = substr_count($custom_head, ' getRules() ) ) : ?>

data-tiered-pricing-table data-product-id="" data-price-rules=" getRules() ), ENT_QUOTES ) ); ?> " data-minimum="" data-product-name="" data-regular-price="" data-sale-price="" data-price="" data-product-price-suffix="get_price_suffix() ); ?>">
'], ['
'], $custom_head) ); ?>
= array_keys( $pricing_rule->getRules() )[0] - $minimum || 'static' === $settings['quantity_type'] ) : ?> 1 ? $settings['quantity_measurement_plural'] : $settings['quantity_measurement_singular'] ) ); ?> - getRules() )[0] - 1 ) ); ?> $id, 'style' => 'default', ) ); ?>
is_on_sale() ) { $discountAmount = PriceManager::calculateDiscount( $product->get_regular_price(), $product->get_sale_price() ); } ?>
0 ) : ?> —
$real_price, ) ) ) ); ?>
'], ['
'], $custom_cols) ); ?>
getRules() ); ?> valid() ) : ob_start(); ?> current(); $currentQuantity = $iterator->key(); $iterator->next(); if ( $pricing_rule->getType() === 'percentage' ) { $discountAmount = $currentPrice; } else { $discountAmount = PriceManager::calculateDiscount( CalculationLogic::calculateDiscountBasedOnRegularPrice() ? $product->get_regular_price() : $product->get_price(), $pricing_rule->getTierPrice( $currentQuantity, false ) ); } $quantity = number_format_i18n( $currentQuantity ); if ( $iterator->valid() ) { if ( intval( $iterator->key() - 1 != $currentQuantity ) && 'range' === $settings['quantity_type'] ) { $quantity .= ' - ' . number_format_i18n( intval( $iterator->key() - 1 ) ); } } else { $quantity .= apply_filters( 'tiered_pricing_table/tiered_pricing/last_tier_postfix', '+', $currentQuantity, $pricing_rule, 'table' ); } $quantity .= ' ' . $settings['quantity_measurement_plural']; $currentProductPrice = $pricing_rule->getTierPrice( $currentQuantity ); $currentProductPriceExcludeTaxes = wc_get_price_excluding_tax( wc_get_product( $product_id ), array( 'price' => $pricing_rule->getTierPrice( $currentQuantity, false ), ) ); $currentProductPriceIncludeTaxes = wc_get_price_including_tax( wc_get_product( $product_id ), array( 'price' => $pricing_rule->getTierPrice( $currentQuantity, false ), ) ); ?>
$id, 'style' => 'default', ) ); ?>
0 ) : ?> —
getTierPrice( $currentQuantity ) ) ); ?>
'], ['
'], $custom_cols) ); ?>