Show shipping. Closes #933.
This commit is contained in:
parent
db21fa13f4
commit
517c6186cb
|
@ -296,6 +296,11 @@ class WC_Order {
|
|||
return apply_filters( 'woocommerce_order_amount_shipping_tax', $this->order_shipping_tax );
|
||||
}
|
||||
|
||||
/** Gets shipping method title */
|
||||
function get_shipping_method() {
|
||||
return apply_filters( 'woocommerce_order_shipping_method', ucwords( $this->shipping_method_title ) );
|
||||
}
|
||||
|
||||
/** Gets order total */
|
||||
function get_total() {
|
||||
return apply_filters( 'woocommerce_order_amount_total', $this->order_total );
|
||||
|
@ -478,8 +483,10 @@ class WC_Order {
|
|||
|
||||
endif;
|
||||
|
||||
$shipping .= sprintf( __(' <small>%svia %s</small>', 'woocommerce'), $tax_text, ucwords( $this->shipping_method_title ) );
|
||||
$shipping .= sprintf( __(' <small>%svia %s</small>', 'woocommerce'), $tax_text, $this->get_shipping_method() );
|
||||
|
||||
elseif ( $this->get_shipping_method() ) :
|
||||
$shipping = $this->get_shipping_method();
|
||||
else :
|
||||
$shipping = __('Free!', 'woocommerce');
|
||||
endif;
|
||||
|
@ -522,7 +529,7 @@ class WC_Order {
|
|||
if ( $this->get_cart_discount() > 0 )
|
||||
$total_rows[ __( 'Cart Discount:', 'woocommerce' ) ] = '-' . $this->get_cart_discount_to_display();
|
||||
|
||||
if ( $this->get_shipping() > 0 )
|
||||
if ( $this->get_shipping_method() )
|
||||
$total_rows[ __('Shipping:', 'woocommerce') ] = $this->get_shipping_to_display();
|
||||
|
||||
if ( $this->get_total_tax() > 0 ) {
|
||||
|
|
|
@ -192,6 +192,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Tweak - Cart widget respects cart tax settings
|
||||
* Tweak - Exempt from VAT shows price ex VAT
|
||||
* Tweak - Newlines for order meta (flat)
|
||||
* Tweak - Show method title when free
|
||||
* Fix - Strange error where detecting the page (is_page etc) would break the canonical redirect in some instances when hooked into 'wp'. Used the later get_header hook instead.
|
||||
* Fix - Right now links.
|
||||
* Fix - fix for https://bugs.php.net/bug.php?id=61166 (thanks Max Rice)
|
||||
|
|
Loading…
Reference in New Issue