before/after cart totals hooks instead of do_after_cart_totals

This commit is contained in:
Mike Jolley 2012-02-23 10:01:15 +00:00
parent 0de854ae8d
commit b6236998cf
2 changed files with 5 additions and 2 deletions

View File

@ -101,8 +101,6 @@ global $woocommerce;
<?php woocommerce_cart_totals(); ?>
<?php do_action('woocommerce_do_after_cart_totals'); ?>
<?php woocommerce_shipping_calculator(); ?>
</div>

View File

@ -9,6 +9,8 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
?>
<div class="cart_totals <?php if (isset($_SESSION['calculated_shipping']) && $_SESSION['calculated_shipping']) echo 'calculated_shipping'; ?>">
<?php do_action('woocommerce_before_cart_totals'); ?>
<?php if ( !$woocommerce->shipping->enabled || $available_methods || !$woocommerce->customer->get_shipping_country() || !isset($_SESSION['calculated_shipping']) || !$_SESSION['calculated_shipping'] ) : ?>
<h2><?php _e('Cart Totals', 'woocommerce'); ?></h2>
@ -209,4 +211,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
<?php endif; ?>
<?php endif; ?>
<?php do_action('woocommerce_after_cart_totals'); ?>
</div>