Created
February 22, 2016 11:44
-
-
Save Musilda/c4218e7eca1e6c447392 to your computer and use it in GitHub Desktop.
WooCommerce - Display Price For Variable Product With Same Variations Prices
This file contains hidden or 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