Merge remote branch 'upstream/master'
Conflicts: woocommerce.php
This commit is contained in:
commit
2bd123f37c
|
@ -75,7 +75,7 @@ function woocommerce_edit_product_columns($columns){
|
|||
$columns["price"] = __("Price", 'woocommerce');
|
||||
|
||||
$columns["product_cat"] = __("Categories", 'woocommerce');
|
||||
$columns["product_tags"] = __("Tags", 'woocommerce');
|
||||
$columns["product_tag"] = __("Tags", 'woocommerce');
|
||||
$columns["featured"] = '<img src="' . $woocommerce->plugin_url() . '/assets/images/featured_head.png" alt="' . __("Featured", 'woocommerce') . '" class="tips" data-tip="' . __("Featured", 'woocommerce') . '" />';
|
||||
$columns["product_type"] = '<img src="' . $woocommerce->plugin_url() . '/assets/images/product_type_head.png" alt="' . __("Type", 'woocommerce') . '" class="tips" data-tip="' . __("Type", 'woocommerce') . '" />';
|
||||
$columns["date"] = __("Date", 'woocommerce');
|
||||
|
@ -205,10 +205,16 @@ function woocommerce_custom_product_columns( $column ) {
|
|||
if ($product->get_price_html()) echo $product->get_price_html(); else echo '<span class="na">–</span>';
|
||||
break;
|
||||
case "product_cat" :
|
||||
if (!$terms = get_the_term_list($post->ID, 'product_cat', '', ', ','')) echo '<span class="na">–</span>'; else echo $terms;
|
||||
break;
|
||||
case "product_tags" :
|
||||
if (!$terms = get_the_term_list($post->ID, 'product_tag', '', ', ','')) echo '<span class="na">–</span>'; else echo $terms;
|
||||
case "product_tag" :
|
||||
if ( ! $terms = get_the_terms( $post->ID, $column ) ) {
|
||||
echo '<span class="na">–</span>';
|
||||
} else {
|
||||
foreach ( $terms as $term ) {
|
||||
$termlist[] = '<a href="' . admin_url( 'edit.php?' . $column . '=' . $term->slug . '&post_type=product' ) . ' ">' . $term->name . '</a>';
|
||||
}
|
||||
|
||||
echo implode( ', ', $termlist );
|
||||
}
|
||||
break;
|
||||
case "featured" :
|
||||
$url = wp_nonce_url( admin_url('admin-ajax.php?action=woocommerce-feature-product&product_id=' . $post->ID), 'woocommerce-feature-product' );
|
||||
|
|
|
@ -72,8 +72,8 @@ function woocommerce_dashboard_widget_right_now() {
|
|||
$text = '<a href="' . $link . '">' . $text . '</a>';
|
||||
?>
|
||||
|
||||
<td class="first b b-product_tags"><?php echo $num; ?></td>
|
||||
<td class="t product_tags"><?php echo $text; ?></td>
|
||||
<td class="first b b-product_tag"><?php echo $num; ?></td>
|
||||
<td class="t product_tag"><?php echo $text; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
|
|
@ -639,6 +639,7 @@ $woocommerce_settings['catalog'] = apply_filters('woocommerce_catalog_settings',
|
|||
'cm' => __( 'cm', 'woocommerce' ),
|
||||
'mm' => __( 'mm', 'woocommerce' ),
|
||||
'in' => __( 'in', 'woocommerce' ),
|
||||
'yd' => __( 'yd', 'woocommerce' ),
|
||||
),
|
||||
'desc_tip' => true,
|
||||
),
|
||||
|
@ -1179,6 +1180,7 @@ function woocommerce_settings() {
|
|||
// Flush rules and clear any unwanted data
|
||||
flush_rewrite_rules( false );
|
||||
unset($_SESSION['orderby']);
|
||||
$woocommerce->clear_product_transients();
|
||||
|
||||
// Redirect back
|
||||
$redirect = add_query_arg( 'saved', 'true' );
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -859,7 +859,7 @@ table.wp-list-table {
|
|||
.column-product_cat, .column-product_tag {
|
||||
width: 11% !important;
|
||||
}
|
||||
.column-sku, .column-product_cat, .column-product_tags, .column-is_in_stock, .column-price, .column-product_date {
|
||||
.column-sku, .column-product_cat, .column-product_tag, .column-is_in_stock, .column-price, .column-product_date {
|
||||
width: 9%;
|
||||
}
|
||||
.column-featured, .column-product_type {
|
||||
|
|
|
@ -484,57 +484,62 @@ class WC_Order {
|
|||
|
||||
$total_rows = array();
|
||||
|
||||
if ($subtotal = $this->get_subtotal_to_display())
|
||||
$total_rows[ __('Cart Subtotal:', 'woocommerce') ] = $subtotal;
|
||||
if ( $subtotal = $this->get_subtotal_to_display() )
|
||||
$total_rows[ __( 'Cart Subtotal:', 'woocommerce' ) ] = $subtotal;
|
||||
|
||||
if ($this->get_cart_discount() > 0)
|
||||
$total_rows[ __('Cart Discount:', 'woocommerce') ] = woocommerce_price($this->get_cart_discount());
|
||||
if ( $this->get_cart_discount() > 0 )
|
||||
$total_rows[ __( 'Cart Discount:', 'woocommerce' ) ] = '-' . woocommerce_price( $this->get_cart_discount() );
|
||||
|
||||
if ($this->get_shipping() > 0)
|
||||
if ( $this->get_shipping() > 0 )
|
||||
$total_rows[ __('Shipping:', 'woocommerce') ] = $this->get_shipping_to_display();
|
||||
|
||||
if ($this->get_total_tax() > 0) :
|
||||
if ( $this->get_total_tax() > 0 ) {
|
||||
|
||||
if ( sizeof($this->get_taxes()) > 0 ) :
|
||||
if ( sizeof( $this->get_taxes() ) > 0 ) {
|
||||
|
||||
$has_compound_tax = false;
|
||||
|
||||
foreach ($this->get_taxes() as $tax) :
|
||||
if ($tax['compound']) : $has_compound_tax = true; continue; endif;
|
||||
if (($tax['cart_tax']+$tax['shipping_tax'])==0) continue;
|
||||
$total_rows[ $tax['label'] ] = woocommerce_price( ($tax['cart_tax']+$tax['shipping_tax']) );
|
||||
endforeach;
|
||||
foreach ( $this->get_taxes() as $tax ) {
|
||||
if ( $tax[ 'compound' ] ) {
|
||||
$has_compound_tax = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($has_compound_tax) :
|
||||
if ($subtotal = $this->get_subtotal_to_display( true )) :
|
||||
$total_rows[ __('Subtotal:', 'woocommerce') ] = $subtotal;
|
||||
endif;
|
||||
endif;
|
||||
if ( ( $tax[ 'cart_tax' ] + $tax[ 'shipping_tax' ] ) == 0 )
|
||||
continue;
|
||||
|
||||
foreach ($this->get_taxes() as $tax) :
|
||||
if (!$tax['compound']) continue;
|
||||
if (($tax['cart_tax']+$tax['shipping_tax'])==0) continue;
|
||||
$total_rows[ $tax['label'] ] = woocommerce_price( ($tax['cart_tax']+$tax['shipping_tax']) );
|
||||
endforeach;
|
||||
$total_rows[ $tax[ 'label' ] ] = woocommerce_price( ( $tax[ 'cart_tax' ] + $tax[ 'shipping_tax' ] ) );
|
||||
}
|
||||
|
||||
else :
|
||||
if ( $has_compound_tax ) {
|
||||
if ( $subtotal = $this->get_subtotal_to_display( true ) ) {
|
||||
$total_rows[ __( 'Subtotal:', 'woocommerce' ) ] = $subtotal;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $this->get_taxes() as $tax ) {
|
||||
if ( ! $tax[ 'compound' ] )
|
||||
continue;
|
||||
|
||||
if ( ( $tax[ 'cart_tax' ] + $tax[ 'shipping_tax' ] ) == 0 )
|
||||
continue;
|
||||
|
||||
$total_rows[ $tax[ 'label' ] ] = woocommerce_price( ( $tax[ 'cart_tax' ] + $tax[ 'shipping_tax' ] ) );
|
||||
}
|
||||
} else {
|
||||
$total_rows[ $woocommerce->countries->tax_or_vat() ] = woocommerce_price($this->get_total_tax());
|
||||
}
|
||||
|
||||
endif;
|
||||
|
||||
elseif ( get_option( 'woocommerce_display_cart_taxes_if_zero' ) == 'yes' ) :
|
||||
|
||||
} elseif ( get_option( 'woocommerce_display_cart_taxes_if_zero' ) == 'yes' ) {
|
||||
$total_rows[ $woocommerce->countries->tax_or_vat() ] = _x( 'N/A', 'Relating to tax', 'woocommerce' );
|
||||
}
|
||||
|
||||
endif;
|
||||
if ( $this->get_order_discount() > 0 )
|
||||
$total_rows[ __( 'Order Discount:', 'woocommerce' ) ] = '-' . woocommerce_price( $this->get_order_discount() );
|
||||
|
||||
if ($this->get_order_discount() > 0)
|
||||
$total_rows[ __('Order Discount:', 'woocommerce') ] = woocommerce_price($this->get_order_discount());
|
||||
$total_rows[ __( 'Order Total:', 'woocommerce' ) ] = woocommerce_price( $this->get_order_total() );
|
||||
|
||||
$total_rows[ __('Order Total:', 'woocommerce') ] = woocommerce_price($this->get_order_total());
|
||||
|
||||
return apply_filters('woocommerce_get_order_item_totals', $total_rows, $this);
|
||||
return apply_filters( 'woocommerce_get_order_item_totals', $total_rows, $this );
|
||||
}
|
||||
|
||||
/** Output items for display in html emails */
|
||||
|
|
|
@ -387,7 +387,7 @@ class WC_Paypal extends WC_Payment_Gateway {
|
|||
|
||||
$paypal_args = $this->get_paypal_args( $order );
|
||||
|
||||
$paypal_args = http_build_query( $paypal_args );
|
||||
$paypal_args = http_build_query( $paypal_args, '', '&' );
|
||||
|
||||
if ( $this->testmode == 'yes' ):
|
||||
$paypal_adr = $this->testurl . '?test_ipn=1&';
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -143,6 +143,14 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 1.5.5 =
|
||||
* Tweak - Added minus symbol before discount on view order page
|
||||
* Tweak - Added yards as dimensions unit
|
||||
* Fix - Replacing use of deprecated function get_current_theme() with wp_get_theme()
|
||||
* Fix - PayPal http_build_query & -> & on some PHP 5.3 servers
|
||||
* Fix - update_count_callback for tags
|
||||
* Localization - Slovak translation by Dušan Beleščák
|
||||
|
||||
= 1.5.4 - 16/04/2012 =
|
||||
* Feature - Allow attributes to be added from the edit product page
|
||||
* Feature - Allow external products to be a part of a grouped product. Button titles will be respected when displayed.
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
function woocommerce_get_dimension( $dim, $to_unit ) {
|
||||
|
||||
$from_unit = strtolower( get_option('woocommerce_dimension_unit') );
|
||||
$from_unit = strtolower( get_option( 'woocommerce_dimension_unit' ) );
|
||||
$to_unit = strtolower( $to_unit );
|
||||
|
||||
// Unify all units to cm first
|
||||
|
@ -39,6 +39,9 @@ function woocommerce_get_dimension( $dim, $to_unit ) {
|
|||
case 'mm':
|
||||
$dim *= 0.1;
|
||||
break;
|
||||
case 'yd':
|
||||
$dim *= 0.010936133;
|
||||
break;
|
||||
}
|
||||
|
||||
// Output desired unit
|
||||
|
@ -52,6 +55,9 @@ function woocommerce_get_dimension( $dim, $to_unit ) {
|
|||
case 'mm':
|
||||
$dim *= 10;
|
||||
break;
|
||||
case 'yd':
|
||||
$dim *= 91.44;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ( $dim < 0 ) ? 0 : $dim;
|
||||
|
|
|
@ -424,7 +424,8 @@ class Woocommerce {
|
|||
* Add body classes
|
||||
**/
|
||||
function wp_head() {
|
||||
$this->add_body_class('theme-' . get_current_theme() );
|
||||
$theme_name = ( function_exists( 'wp_get_theme' ) ) ? wp_get_theme() : get_current_theme();
|
||||
$this->add_body_class( "theme-{$theme_name}" );
|
||||
|
||||
if ( is_woocommerce() ) $this->add_body_class('woocommerce');
|
||||
|
||||
|
@ -577,6 +578,7 @@ class Woocommerce {
|
|||
array('product'),
|
||||
array(
|
||||
'hierarchical' => false,
|
||||
'update_count_callback' => '_update_post_term_count',
|
||||
'label' => __( 'Product Tags', 'woocommerce'),
|
||||
'labels' => array(
|
||||
'name' => __( 'Tags', 'woocommerce'),
|
||||
|
|
Loading…
Reference in New Issue