Consistant hooks for review order/cart totals - Closes #2076.
This commit is contained in:
parent
b11b121d24
commit
4988e0f444
|
@ -40,11 +40,15 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
|
||||
<?php if ( $woocommerce->cart->needs_shipping() && $woocommerce->cart->show_shipping() && ( $available_methods || get_option( 'woocommerce_enable_shipping_calc' ) == 'yes' ) ) : ?>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_totals_before_shipping' ); ?>
|
||||
|
||||
<tr class="shipping">
|
||||
<th><?php _e( 'Shipping', 'woocommerce' ); ?></th>
|
||||
<td><?php woocommerce_get_template( 'cart/shipping-methods.php', array( 'available_methods' => $available_methods ) ); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_totals_after_shipping' ); ?>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
<?php foreach ( $woocommerce->cart->get_fees() as $fee ) : ?>
|
||||
|
@ -119,6 +123,8 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_totals_before_order_total' ); ?>
|
||||
|
||||
<tr class="total">
|
||||
<th><strong><?php _e( 'Order Total', 'woocommerce' ); ?></strong></th>
|
||||
<td>
|
||||
|
@ -143,6 +149,8 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_totals_after_order_total' ); ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_before_order_total' ); ?>
|
||||
<?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
|
||||
|
||||
<tr class="total">
|
||||
<th><strong><?php _e( 'Order Total', 'woocommerce' ); ?></strong></th>
|
||||
|
@ -155,10 +155,13 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<?php do_action( 'woocommerce_after_order_total' ); ?>
|
||||
<?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
|
||||
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
do_action( 'woocommerce_review_order_before_cart_contents' );
|
||||
|
||||
if (sizeof($woocommerce->cart->get_cart())>0) :
|
||||
foreach ($woocommerce->cart->get_cart() as $item_id => $values) :
|
||||
$_product = $values['data'];
|
||||
|
@ -172,7 +175,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
endforeach;
|
||||
endif;
|
||||
|
||||
do_action( 'woocommerce_cart_contents_review_order' );
|
||||
do_action( 'woocommerce_review_order_after_cart_contents' );
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue