Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Julian Jöris 2011-11-24 16:07:12 +01:00
commit 9bd88e3a52
2 changed files with 273 additions and 270 deletions

View File

@ -887,8 +887,8 @@ function woocommerce_top_sellers() {
endif;
asort($found_products);
$found_products = array_slice($found_products, 0, 25, true);
$found_products = array_reverse($found_products, true);
$found_products = array_slice($found_products, 0, 25, true);
reset($found_products);
remove_filter( 'posts_where', 'orders_within_range' );
@ -981,8 +981,8 @@ function woocommerce_top_earners() {
endif;
asort($found_products);
$found_products = array_slice($found_products, 0, 25, true);
$found_products = array_reverse($found_products, true);
$found_products = array_slice($found_products, 0, 25, true);
reset($found_products);
remove_filter( 'posts_where', 'orders_within_range' );

View File

@ -284,9 +284,9 @@ if (!function_exists('woocommerce_simple_add_to_cart')) {
// No price set - so no button
if( $_product->get_price() === '') return;
if ($availability['availability']) : ?>
<p class="stock <?php echo $availability['class'] ?>"><?php echo $availability['availability']; ?></p>
<?php endif;
if ($availability['availability']) :
echo apply_filters( 'woocommerce_stock_html', '<p class="stock '.$availability['class'].'">'.$availability['availability'].'</p>', $availability['availability'] );
endif;
// Don't show cart if out of stock
if (!$_product->is_in_stock()) :
@ -337,7 +337,10 @@ if (!function_exists('woocommerce_grouped_add_to_cart')) {
echo $child_product->get_title();
if ($child_product->is_visible()) echo '</a>';
?></label></td>
<td class="price"><?php echo $child_product->get_price_html(); ?><small class="stock <?php echo $cavailability['class'] ?>"><?php echo $cavailability['availability']; ?></small></td>
<td class="price"><?php echo $child_product->get_price_html(); ?>
<?php echo apply_filters( 'woocommerce_stock_html',
'<small class="stock '.$cavailability['class'].'">'.$cavailability['availability'].'</small>', $cavailability['availability'] ); ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
@ -377,7 +380,7 @@ if (!function_exists('woocommerce_variable_add_to_cart')) {
$variation_attributes = $variation->get_variation_attributes();
$availability = $variation->get_availability();
$availability_html = (!empty($availability['availability'])) ? '<p class="stock '.$availability['class'].'">'. $availability['availability'].'</p>' : '';
$availability_html = (!empty($availability['availability'])) ? apply_filters( 'woocommerce_stock_html', '<p class="stock '.$availability['class'].'">'. $availability['availability'].'</p>', $availability['availability'] ) : '';
if (has_post_thumbnail($variation->get_variation_id())) {
$attachment_id = get_post_thumbnail_id( $variation->get_variation_id() );
@ -433,7 +436,7 @@ if (!function_exists('woocommerce_variable_add_to_cart')) {
endif;
?>
<?php endif;?>
</select></td>
</td>
</tr>
<?php endforeach;?>
</tbody>