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:
commit
8256baff0d
|
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue