Merge pull request #29847 from codetot/fix/widget_products
Set loop prop to widget products to adapt condition on single product page
This commit is contained in:
commit
c35ed5e1a6
|
@ -186,6 +186,8 @@ class WC_Widget_Products extends WC_Widget {
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
|
wc_set_loop_prop( 'name', 'widget' );
|
||||||
|
|
||||||
$products = $this->get_products( $args, $instance );
|
$products = $this->get_products( $args, $instance );
|
||||||
if ( $products && $products->have_posts() ) {
|
if ( $products && $products->have_posts() ) {
|
||||||
$this->widget_start( $args, $instance );
|
$this->widget_start( $args, $instance );
|
||||||
|
|
Loading…
Reference in New Issue