Add filters to get_product_subtotal in review-order & cart templates.

This commit is contained in:
Manos Psychogyiopoulos 2012-06-09 17:39:59 +03:00
parent e128fc02ee
commit b57183f337
2 changed files with 2 additions and 2 deletions

2
templates/cart/cart.php Normal file → Executable file
View File

@ -88,7 +88,7 @@ global $woocommerce;
<!-- Product subtotal -->
<td class="product-subtotal">
<?php
echo $woocommerce->cart->get_product_subtotal( $_product, $values['quantity'] );
echo apply_filters( 'woocommerce_cart_item_subtotal', $woocommerce->cart->get_product_subtotal( $_product, $values['quantity'] ), $values, $cart_item_key );
?>
</td>
</tr>

View File

@ -207,7 +207,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
<tr>
<td class="product-name">'.$_product->get_title().$woocommerce->cart->get_item_data( $values ).'</td>
<td class="product-quantity">'.$values['quantity'].'</td>
<td class="product-total">' . $woocommerce->cart->get_product_subtotal( $_product, $values['quantity'] ) . '</td>
<td class="product-total">' . apply_filters( 'woocommerce_checkout_item_subtotal', $woocommerce->cart->get_product_subtotal( $_product, $values['quantity'] ), $values, $cart_item_key ) . '</td>
</tr>';
endif;
endforeach;