Variable products showing double price
-
Hi
Like webkaz I am facing the same issue with double pricing on variable products.
I tried to use this in order to remove double pricing which worked but then the wholesale pricing was not showing to the wholesale customers.
Is there any solution so far?function wc_varb_price_range( $wcv_price, $product ) {
$prefix = sprintf(‘%s: ‘, __(‘From’, ‘wcvp_range’));
$wcv_reg_min_price = $product->get_variation_regular_price( ‘min’, true );
$wcv_min_sale_price = $product->get_variation_sale_price( ‘min’, true );
$wcv_max_price = $product->get_variation_price( ‘max’, true );
$wcv_min_price = $product->get_variation_price( ‘min’, true );$wcv_price = ( $wcv_min_sale_price == $wcv_reg_min_price ) ?
wc_price( $wcv_reg_min_price ) :
‘‘ . wc_price( $wcv_reg_min_price ) . ‘‘ . ‘‘ . wc_price( $wcv_min_sale_price ) . ‘‘;return ( $wcv_min_price == $wcv_max_price ) ?
$wcv_price :
sprintf(‘%s%s’, $prefix, $wcv_price);
}add_filter( ‘woocommerce_variable_sale_price_html’, ‘wc_varb_price_range’, 10, 2 );
add_filter( ‘woocommerce_variable_price_html’, ‘wc_varb_price_range’, 10, 2 );
- The topic ‘Variable products showing double price’ is closed to new replies.