Created
July 10, 2015 15:18
-
-
Save musicalbigfoot/c3974091e7b02163da4b to your computer and use it in GitHub Desktop.
Woocommerce: Show variable product price when all prices are the same
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Display Price For Variable Product With Same Variations Prices | |
add_filter('woocommerce_available_variation', function ($value, $object = null, $variation = null) { | |
if ($value['price_html'] == '') { | |
$value['price_html'] = '<span class="price">' . $variation->get_price_html() . '</span>'; | |
} | |
return $value; | |
}, 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment