Permalink
Browse files

Merge remote branch 'upstream/master'

Conflicts:
	woocommerce.php
  • Loading branch information...
2 parents 9b9366c + 087d60b commit 2bd123f37c920472f97818c9085fdacf67b508b7 @om4james om4james committed Apr 19, 2012
@@ -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">&ndash;</span>';
break;
case "product_cat" :
- if (!$terms = get_the_term_list($post->ID, 'product_cat', '', ', ','')) echo '<span class="na">&ndash;</span>'; else echo $terms;
- break;
- case "product_tags" :
- if (!$terms = get_the_term_list($post->ID, 'product_tag', '', ', ','')) echo '<span class="na">&ndash;</span>'; else echo $terms;
+ case "product_tag" :
+ if ( ! $terms = get_the_terms( $post->ID, $column ) ) {
+ echo '<span class="na">&ndash;</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 @@
'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' );
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -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 {
View
@@ -484,57 +484,62 @@ function get_order_item_totals() {
$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 ( ( $tax[ 'cart_tax' ] + $tax[ 'shipping_tax' ] ) == 0 )
+ continue;
+
+ $total_rows[ $tax[ 'label' ] ] = woocommerce_price( ( $tax[ 'cart_tax' ] + $tax[ 'shipping_tax' ] ) );
+ }
- if ($has_compound_tax) :
- if ($subtotal = $this->get_subtotal_to_display( true )) :
- $total_rows[ __('Subtotal:', 'woocommerce') ] = $subtotal;
- endif;
- endif;
+ 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']) );
- endforeach;
-
- else :
-
+ 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 @@ function process_payment( $order_id ) {
$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.
Oops, something went wrong.

0 comments on commit 2bd123f

Please sign in to comment.