Remove reference assignment operator
This commit is contained in:
parent
6d74a1576f
commit
0523d899e0
|
@ -35,7 +35,7 @@ if ( $cross_sells ) : ?>
|
|||
<?php
|
||||
$post_object = get_post( $cross_sell->get_id() );
|
||||
|
||||
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
setup_postdata( $GLOBALS['post'] = $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
?>
|
||||
|
|
|
@ -30,7 +30,6 @@ if ( $related_products ) : ?>
|
|||
?>
|
||||
<h2><?php echo esc_html( $heading ); ?></h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php woocommerce_product_loop_start(); ?>
|
||||
|
||||
<?php foreach ( $related_products as $related_product ) : ?>
|
||||
|
@ -38,7 +37,7 @@ if ( $related_products ) : ?>
|
|||
<?php
|
||||
$post_object = get_post( $related_product->get_id() );
|
||||
|
||||
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
setup_postdata( $GLOBALS['post'] = $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
?>
|
||||
|
|
|
@ -37,7 +37,7 @@ if ( $upsells ) : ?>
|
|||
<?php
|
||||
$post_object = get_post( $upsell->get_id() );
|
||||
|
||||
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
setup_postdata( $GLOBALS['post'] = $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue