The sale price is not shown
-
Hi, I’m using a plugin that shows the products of a certain category in tables, but instead of the discounted price, it shows the regular price twice, as if the discount wasn’t applied, while if I add it to the cart, I correctly display the discounted price.
This is the price page managed by the “Product table” plug in
<?php if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } global $product; if ( $product->get_price_html() ) : // Get the prices $price_excl_tax = wc_get_price_excluding_tax( $product ); // price without VAT $price_incl_tax = wc_get_price_including_tax( $product ); // price with VAT $tax_amount = $price_incl_tax - $price_excl_tax; // VAT amount // Display the prices ?> <span class="ivaloop2" >iva incl. <?php echo wc_price( $price_incl_tax ); ?></span> <?php endif ?> <?php global $product; $wpt_single_price = false; //$wpt_single_price .= "<td class='wpt_for_product_action wpt_price' id='price_value_id_" . $data['id'] . "' data-price_html='" . esc_attr( $product->get_price_html() ) . "'> "; $wpt_single_price .= '<span class="wpt_product_price">'; $wpt_single_price .= $product->get_price_html(); //Here was woocommerce_template_loop_price() at version 1.0 $wpt_single_price .= '</span>'; //$wpt_single_price .= " </td>"; //var_dump($product->get_price()); echo wp_kses_post( $wpt_single_price );
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘The sale price is not shown’ is closed to new replies.