Passing by reference breaks global functions in grouped template

Fixes #16236
This commit is contained in:
Mike Jolley 2017-08-01 08:44:16 +02:00
parent cad30e9613
commit 2b9c8677eb
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
$post_object = get_post( $grouped_product->get_id() );
$quantites_required = $quantites_required || ( $grouped_product->is_purchasable() && ! $grouped_product->has_options() );
setup_postdata( $post =& $post_object );
setup_postdata( $post = $post_object );
?>
<tr id="product-<?php the_ID(); ?>" <?php post_class(); ?>>
<td>
@ -81,7 +81,7 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
<?php
}
// Return data to original post.
setup_postdata( $post =& $previous_post );
setup_postdata( $post = $previous_post );
?>
</tbody>
</table>