Fixed query breaking when using some product widgets and closes #3333

This commit is contained in:
Coen Jacobs 2013-06-14 16:51:49 +02:00
parent 583dc7ffe9
commit ed0bfbf62c
6 changed files with 11 additions and 0 deletions

View File

@ -123,6 +123,8 @@ class WC_Widget_Best_Sellers extends WP_Widget {
echo $after_widget;
}
wp_reset_postdata();
$content = ob_get_clean();
if ( isset( $args['widget_id'] ) ) $cache[$args['widget_id']] = $content;

View File

@ -119,6 +119,8 @@ class WC_Widget_Onsale extends WP_Widget {
echo $after_widget;
}
wp_reset_postdata();
$content = ob_get_clean();
if ( isset( $args['widget_id'] ) ) $cache[$args['widget_id']] = $content;

View File

@ -94,6 +94,8 @@ class WC_Widget_Random_Products extends WP_Widget {
<?php
echo $args['after_widget'];
}
wp_reset_postdata();
}
/**

View File

@ -116,6 +116,8 @@ class WC_Widget_Recent_Products extends WP_Widget {
echo $after_widget;
}
wp_reset_postdata();
$content = ob_get_clean();
if ( isset( $args['widget_id'] ) ) $cache[$args['widget_id']] = $content;

View File

@ -114,6 +114,8 @@ class WC_Widget_Recently_Viewed extends WP_Widget {
echo $after_widget;
}
wp_reset_postdata();
$content = ob_get_clean();
if ( isset( $args['widget_id'] ) ) $cache[$args['widget_id']] = $content;

View File

@ -168,6 +168,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
= 2.0.12 - x =
* Fix - Fixed bug in cross sells loading in product data write panel
* Fix - Fixed posting shipping method when only one is available
* Fix - Fixed query breaking when using some product widgets
= 2.0.11 - 13/06/2013 =
* Tweak - Handling for multiselect fields on checkout, and a filter for third party handling