Skip to content

Instantly share code, notes, and snippets.

@musicalbigfoot
Created July 10, 2015 15:18
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 musicalbigfoot/c3974091e7b02163da4b to your computer and use it in GitHub Desktop.
Save musicalbigfoot/c3974091e7b02163da4b to your computer and use it in GitHub Desktop.
Woocommerce: Show variable product price when all prices are the same
// 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