Skip to content

Instantly share code, notes, and snippets.

@Musilda
Created February 22, 2016 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Musilda/c4218e7eca1e6c447392 to your computer and use it in GitHub Desktop.
Save Musilda/c4218e7eca1e6c447392 to your computer and use it in GitHub Desktop.
WooCommerce - Display Price For Variable Product With Same Variations Prices
// 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