Merge pull request #20020 from woocommerce/fix/20014

Prevent infinite loops when grouped products group each other
This commit is contained in:
Claudiu Lodromanean 2018-05-09 06:53:29 -07:00 committed by GitHub
commit f88a0d011d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ class WC_Product_Grouped extends WC_Product {
$on_sale = false;
foreach ( $children as $child ) {
if ( $child->is_on_sale() ) {
if ( $child->is_purchasable() && ! $child->has_child() && $child->is_on_sale() ) {
$on_sale = true;
break;
}