• Resolved tekno-sun.com

    (@tekno-suncom)


    Hello,
    I’m using Woocommerce’s latest version but there’s a issue.
    Variation prices is not showing.

    The things i’ve tried;
    – Disable theme, try another one
    – Disable all plugins
    – Tried this two thing together.

    Can’t find the solution…

    The page I need help with: [log in to see the link]

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)

The topic ‘Variation Price Problem’ is closed to new replies.