Created
December 8, 2012 10:48
-
-
Save kloon/4239771 to your computer and use it in GitHub Desktop.
WooCommerce Name Your Price, show minimum price on archive pages
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
add_filter( 'woocommerce_get_price_html', 'woocommerce_nyp_min_price', 11, 2 ); | |
function woocommerce_nyp_min_price( $price, $product ) { | |
if ( !$product->nyp ) | |
return $price; | |
if( is_shop() || is_product_category() || is_product_tag() ) { | |
$price = woocommerce_price( $product->minimum ); | |
} | |
return $price; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment