Fix woocommerce_reset_loop Closes #4443

This commit is contained in:
Mike Jolley 2014-01-08 13:23:40 +00:00
parent b9a78b5894
commit 211658a8f4
2 changed files with 2 additions and 1 deletions

View File

@ -191,6 +191,7 @@ class WC_Shortcodes {
<?php endif;
woocommerce_reset_loop();
wp_reset_postdata();
return '<div class="woocommerce columns-' . $columns . '">' . ob_get_clean() . '</div>';

View File

@ -547,7 +547,7 @@ if ( ! function_exists( 'woocommerce_reset_loop' ) ) {
function woocommerce_reset_loop() {
global $woocommerce_loop;
// Reset loop/columns globals when starting a new loop
$woocommerce_loop['loop'] = $woocommerce_loop['column'] = '';
$woocommerce_loop['loop'] = $woocommerce_loop['columns'] = '';
}
}