Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter tekno-sun.com

    (@tekno-suncom)

    	<?php 
    	if ( !$product->is_type( 'variable' ) ) {
    		echo woocommerce_single_price();
    	} else {
    		$variations = $product->get_available_variations();
    		$a = round($product->get_variation_price('max', true), 2);
    		$t = false;
        	        foreach ( $variations as $key ) {
    			if (round($key["display_price"], 2) != $a) {
    				$t = true;
    			}
    		}
    
    		if (!$t) {
    			echo woocommerce_single_price();
    		}
    	}
    	?>
    

    This fixes the problem.

Viewing 1 replies (of 1 total)