How to break an infinite getSku() recursion while upgrading Magento from 2.1.x to 2.2.x?

Locate the line:


Add the following block above:

if (($p = @$options['simple_product']) && @$p['product_id'] == $this->getId()) {
	unset($options['simple_product']);
}