Fix is_on_sale for variations. Closes #3247.

This commit is contained in:
Mike Jolley 2013-06-05 16:47:51 +01:00
parent 4e5558490c
commit 05d8b708bb
1 changed files with 2 additions and 1 deletions

View File

@ -210,8 +210,9 @@ class WC_Product_Variable extends WC_Product {
if ( $this->has_child() ) {
foreach ( $this->get_children() as $child_id ) {
$price = get_post_meta( $child_id, '_price', true );
$sale_price = get_post_meta( $child_id, '_sale_price', true );
if ( $sale_price !== "" && $sale_price >= 0 )
if ( $sale_price !== "" && $sale_price >= 0 && $sale_price == $price )
return true;
}