Passing by reference breaks global functions in grouped template
Fixes #16236
This commit is contained in:
parent
cad30e9613
commit
2b9c8677eb
|
@ -34,7 +34,7 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
|
||||||
$post_object = get_post( $grouped_product->get_id() );
|
$post_object = get_post( $grouped_product->get_id() );
|
||||||
$quantites_required = $quantites_required || ( $grouped_product->is_purchasable() && ! $grouped_product->has_options() );
|
$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(); ?>>
|
<tr id="product-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<td>
|
<td>
|
||||||
|
@ -81,7 +81,7 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
// Return data to original post.
|
// Return data to original post.
|
||||||
setup_postdata( $post =& $previous_post );
|
setup_postdata( $post = $previous_post );
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue