Prevent JS Issue if `woocommerce_available_variation` return false for a variation.
After checking some condition if `woocommerce_available_variation` filter return false. Then Option list don't show because of JS issue.
This commit is contained in:
parent
b9cdc760ac
commit
33949f3c25
|
@ -300,7 +300,9 @@ class WC_Product_Variable extends WC_Product {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$available_variations[] = $this->get_available_variation( $variation );
|
if( $this->get_available_variation( $variation ) ){
|
||||||
|
$available_variations[] = $this->get_available_variation( $variation );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$available_variations = array_filter( $available_variations );
|
$available_variations = array_filter( $available_variations );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue