Skip to content

Commit

Permalink
Moved fees html to checkout template. #418
Browse files Browse the repository at this point in the history
  • Loading branch information
pippinsplugins committed Feb 9, 2013
1 parent 83d508b commit 3537c41
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
27 changes: 0 additions & 27 deletions includes/class-edd-fees.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,33 +114,6 @@ public function total() {
}


/**
* Shows fees on checkout
*
* @access public
* @since 1.5
*
* @return void
*/

public function show_fees() {

$fees = $this->get_fees();

if( ! $this->has_fees() )
return;

foreach( $fees as $fee ) {
echo '<tr class="edd_cart_fee">';
echo '<td class="edd_cart_fee_label"><span>' . esc_html( $fee['label'] ) . '</span></td>';
echo '<td class="edd_cart_fee_amount"><span>' . esc_html( edd_currency_filter( edd_format_amount( $fee['amount'] ) ) ) . '</span></td>';
echo '<td></td>';
echo '</tr>';
}

}


}


Expand Down
10 changes: 10 additions & 0 deletions templates/checkout_cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@
<?php do_action( 'edd_checkout_table_body_last', $item ); ?>
</tr>
<?php endforeach; ?>
<!-- Show any cart fees, both positive and negative fees -->
<?php if( edd_cart_has_fees() ) : ?>
<?php foreach( edd_get_cart_fees() as $fee ) : ?>
<tr class="edd_cart_fee">
<td class="edd_cart_fee_label"><span><?php esc_html_e( $fee['label'] ); ?></span></td>
<td class="edd_cart_fee_amount"><span><?php esc_html_e( edd_currency_filter( edd_format_amount( $fee['amount'] ) ) ); ?></span></td>
<td></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
<?php do_action( 'edd_cart_items_after' ); ?>
<?php else: ?>
<tr class="edd_cart_item">
Expand Down

0 comments on commit 3537c41

Please sign in to comment.