Merge pull request #7680 from tamarazuk/grouped-is-on-sale-fix

Missing argument on `woocommerce_product_is_on_sale` grouped product filter
This commit is contained in:
Mike Jolley 2015-03-10 10:25:05 +00:00
commit 8256baff0d
1 changed files with 3 additions and 1 deletions

View File

@ -127,6 +127,7 @@ class WC_Product_Grouped extends WC_Product {
*/
public function is_on_sale() {
$is_on_sale = false;
if ( $this->has_child() ) {
foreach ( $this->get_children() as $child_id ) {
@ -143,7 +144,8 @@ class WC_Product_Grouped extends WC_Product {
}
}
return apply_filters( 'woocommerce_product_is_on_sale', $is_on_sale );
return apply_filters( 'woocommerce_product_is_on_sale', $is_on_sale, $this );
}