diff --git a/admin/admin-taxonomies.php b/admin/admin-taxonomies.php index 7eb1e1a06c1..b7709fc6693 100644 --- a/admin/admin-taxonomies.php +++ b/admin/admin-taxonomies.php @@ -140,10 +140,12 @@ function woocommerce_category_thumbnail_field_save( $term_id, $tt_id, $taxonomy /** * Reorder on term insertion */ -add_action("create_term", 'woocommerce_create_term'); +add_action("create_term", 'woocommerce_create_term', 5, 3); function woocommerce_create_term( $term_id, $tt_id, $taxonomy ) { + if (!$taxonomy=='product_cat' && !strstr($taxonomy, 'pa_')) return; + $next_id = null; $term = get_term($term_id, $taxonomy); @@ -164,7 +166,7 @@ function woocommerce_create_term( $term_id, $tt_id, $taxonomy ) { /** * Delete terms metas on deletion */ -add_action("delete_product_term", 'woocommerce_delete_term'); +add_action("delete_product_term", 'woocommerce_delete_term', 5, 3); function woocommerce_delete_term( $term_id, $tt_id, $taxonomy ) { diff --git a/admin/writepanels/writepanel-order_data.php b/admin/writepanels/writepanel-order_data.php index 0daec85abb1..434864d0e37 100644 --- a/admin/writepanels/writepanel-order_data.php +++ b/admin/writepanels/writepanel-order_data.php @@ -138,7 +138,7 @@ function woocommerce_order_items_meta_box($post) { 0 && isset($order_items[0]['id'])) foreach ($order_items as $item) : - + if (isset($item['variation_id']) && $item['variation_id'] > 0) : $_product = &new woocommerce_product_variation( $item['variation_id'] ); else : diff --git a/assets/css/admin.css b/assets/css/admin.css index cc0427ad10f..4c19137a2f2 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -14,8 +14,8 @@ #woocommerce-order-items .buttons button{margin:2px 0 0 0;} #woocommerce-order-items .buttons-alt{float:right;padding-right:6px;} #woocommerce-order-items h3 small{color:#999;} -dl.totals{margin:6px 6px 0;float:left;}dl.totals dt{float:left;width:100%;font-size:1.2em;font-weight:bold;line-height:2em;} -dl.totals dd{line-height:2em;font-size:1.2em;float:left;width:100%;}dl.totals dd input{width:100%;vertical-align:middle;float:left;font-size:1em;margin:0 !important;} +dl.totals{margin:6px 6px 0;float:left;}dl.totals dt{float:left;width:100%;font-size:1.2em;font-weight:bold;line-height:2em;margin:0;padding:0;} +dl.totals dd{line-height:2em;font-size:1.2em;float:left;width:100%;margin:0;padding:0;}dl.totals dd input{width:100%;vertical-align:middle;float:left;font-size:1em;margin:0 !important;} dl.totals dd input.first{width:49%;float:left;} dl.totals dd input.last{width:49%;float:right;} .woocommerce_order_items_wrapper{margin:0;}.woocommerce_order_items_wrapper table.woocommerce_order_items{width:100%;background:#fff;}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th{background:#ECECEC;padding:8px 8px;font-size:11px;text-align:left;} diff --git a/assets/css/admin.less b/assets/css/admin.less index 24eed1eb98b..5275fe53c1e 100644 --- a/assets/css/admin.less +++ b/assets/css/admin.less @@ -78,12 +78,16 @@ dl.totals { font-size: 1.2em; font-weight: bold; line-height: 2em; + margin: 0; + padding: 0; } dd { line-height: 2em; font-size: 1.2em; float: left; width: 100%; + margin: 0; + padding: 0; input { width: 100%; vertical-align: middle; diff --git a/assets/js/admin/write-panels.js b/assets/js/admin/write-panels.js index 7890e51ee9a..f2b4dc0b9de 100644 --- a/assets/js/admin/write-panels.js +++ b/assets/js/admin/write-panels.js @@ -57,6 +57,7 @@ jQuery( function($){ if (!itemCost) itemCost = 0; if (!itemTax) itemTax = 0; + if (!itemQty) itemQty = 0; totalItemTax = 0; diff --git a/assets/js/admin/write-panels.min.js b/assets/js/admin/write-panels.min.js index daec8b304ed..819454f1841 100644 --- a/assets/js/admin/write-panels.min.js +++ b/assets/js/admin/write-panels.min.js @@ -1 +1 @@ -jQuery(function(d){jQuery("form#post").bind("keypress",function(g){if(g.keyCode==13){return false}});jQuery("ul.tabs").show();jQuery("div.panel-wrap").each(function(){jQuery("div.panel:not(div.panel:first)",this).hide()});jQuery("ul.tabs a").click(function(){var g=jQuery(this).closest("div.panel-wrap");jQuery("ul.tabs li",g).removeClass("active");jQuery(this).parent().addClass("active");jQuery("div.panel",g).hide();jQuery(jQuery(this).attr("href")).show();return false});jQuery("#order_items_list button.remove_row").live("click",function(){var g=confirm(woocommerce_writepanel_params.remove_item_notice);if(g){jQuery(this).closest("tr.item").hide();jQuery("input",jQuery(this).closest("tr.item")).val("")}return false});jQuery("button.calc_totals").live("click",function(){var p=confirm(woocommerce_writepanel_params.cart_total);if(p){var h=jQuery("#order_items_list tr.item").size();var n=0;var o=jQuery("input#_order_discount").val();var g=jQuery("input#_order_shipping").val();var k=parseFloat(jQuery("input#_order_shipping_tax").val());var l=0;var j=0;var m=0;if(!o){o=0}if(!g){g=0}if(!k){k=0}if(h>0){for(i=0;i0){taxRate=itemTax/100;itemTaxAmount=((itemCost*taxRate)*100);itemTaxAmount=itemTaxAmount.toFixed(2);totalItemTax=Math.round(itemTaxAmount)/100;totalItemTax=totalItemTax*itemQty}j=j+totalItemCost;l=l+totalItemTax}}n=j;m=parseFloat(n)+parseFloat(l)-parseFloat(o)+parseFloat(g)+parseFloat(k);if(m<0){m=0}jQuery("input#_order_subtotal").val(n.toFixed(2));jQuery("input#_order_tax").val(l.toFixed(2));jQuery("input#_order_shipping_tax").val(k.toFixed(2));jQuery("input#_order_total").val(m.toFixed(2))}return false});jQuery("button.add_shop_order_item").click(function(){var j=jQuery("select.add_item_id").val();if(j){jQuery("table.woocommerce_order_items").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_writepanel_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:0.6}});var g=jQuery("table.woocommerce_order_items tbody tr.item").size();var h={action:"woocommerce_add_order_item",item_to_add:jQuery("select.add_item_id").val(),index:g,security:woocommerce_writepanel_params.add_order_item_nonce};jQuery.post(woocommerce_writepanel_params.ajax_url,h,function(k){jQuery("table.woocommerce_order_items tbody#order_items_list").append(k);jQuery("table.woocommerce_order_items").unblock();jQuery("select.add_item_id").css("border-color","").val("");jQuery(".tips").easyTooltip()})}else{jQuery("select.add_item_id").css("border-color","red")}});jQuery("button.add_meta").live("click",function(){var g=jQuery(this).closest("tr.item").attr("rel");jQuery(this).closest("table.meta").find(".meta_items").append('');return false});jQuery("button.remove_meta").live("click",function(){var g=confirm("Remove this meta key?");if(g){jQuery(this).closest("tr").remove()}return false});jQuery("button.billing-same-as-shipping").live("click",function(){var g=confirm(woocommerce_writepanel_params.copy_billing);if(g){jQuery("input#shipping_first_name").val(jQuery("input#billing_first_name").val());jQuery("input#shipping_last_name").val(jQuery("input#billing_last_name").val());jQuery("input#shipping_company").val(jQuery("input#billing_company").val());jQuery("input#shipping_address_1").val(jQuery("input#billing_address_1").val());jQuery("input#shipping_address_2").val(jQuery("input#billing_address_2").val());jQuery("input#shipping_city").val(jQuery("input#billing_city").val());jQuery("input#shipping_postcode").val(jQuery("input#billing_postcode").val());jQuery("input#shipping_country").val(jQuery("input#billing_country").val());jQuery("input#shipping_state").val(jQuery("input#billing_state").val())}return false});d("select#product-type").change(function(){var g=jQuery(this).val();d("#woocommerce-product-type-options .inside > div").hide();d("#"+g+"_product_options").show();if(g=="variable"){jQuery(".stock_fields, .manage_stock_field, .tax_tab, .options_group.pricing").show();jQuery(".options_group.grouping, .options_group.pricing").val("").hide();jQuery("td.enable_variation, th.enable_variation").show();jQuery("input#manage_stock").change()}else{if(g=="simple"){jQuery(".stock_fields, .manage_stock_field, .tax_tab, .options_group.pricing").show();jQuery(".options_group.grouping").show();jQuery("td.enable_variation, th.enable_variation").hide();jQuery("input#manage_stock").change()}else{if(g=="grouped"){jQuery(".stock_fields, .manage_stock_field, .tax_tab, .options_group.pricing").hide();jQuery(".options_group.grouping").val("").hide();jQuery("td.enable_variation, th.enable_variation").hide();jQuery("input#manage_stock").change()}else{if(g=="downloadable"){jQuery(".stock_fields, .manage_stock_field, .tax_tab, .options_group.pricing").show();jQuery(".options_group.grouping").show();jQuery("td.enable_variation, th.enable_variation").hide();jQuery("input#manage_stock").change()}else{if(g=="virtual"){jQuery(".stock_fields, .manage_stock_field, .tax_tab, .options_group.pricing").show();jQuery(".options_group.grouping").show();jQuery("td.enable_variation, th.enable_variation").hide();jQuery("input#manage_stock").change()}}}}}d("body").trigger("woocommerce-product-type-change",g,d(this))}).change();jQuery("input#manage_stock").change(function(){if(jQuery(this).is(":checked")){jQuery("div.stock_fields").show()}else{jQuery("div.stock_fields").hide()}}).change();var e=jQuery("#sale_price_dates_from, #sale_price_dates_to").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:true,showOn:"button",buttonImage:woocommerce_writepanel_params.calendar_image,buttonImageOnly:true,onSelect:function(j){var k=this.id=="sale_price_dates_from"?"minDate":"maxDate",g=jQuery(this).data("datepicker"),h=jQuery.datepicker.parseDate(g.settings.dateFormat||jQuery.datepicker._defaults.dateFormat,j,g.settings);e.not(this).datepicker("option",k,h)}});jQuery(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:true,showOn:"button",buttonImage:woocommerce_writepanel_params.calendar_image,buttonImageOnly:true});jQuery("#attributes_list select.multiselect").multiselect({noneSelectedText:woocommerce_writepanel_params.select_terms,selectedList:4});var c=jQuery("#attributes_list").children("tr").get();c.sort(function(h,g){var k=jQuery(h).attr("rel");var j=jQuery(g).attr("rel");return(kj)?1:0});jQuery(c).each(function(g,h){jQuery("#attributes_list").append(h)});function a(){jQuery("table.woocommerce_attributes, table.woocommerce_variable_attributes").each(function(){if(jQuery("tbody tr",this).size()==0){jQuery(this).parent().hide()}else{jQuery(this).parent().show()}})}a();function b(){jQuery("#attributes_list tr").each(function(g,h){jQuery(".attribute_position",h).val(parseInt(jQuery(h).index("#attributes_list tr")))})}jQuery("button.add_attribute").click(function(){var h=jQuery("table.woocommerce_attributes tbody tr").size();var j=jQuery("select.attribute_taxonomy").val();if(!j){var k=jQuery("select#product-type").val();if(k!="variable"){enable_variation='style="display:none;"'}else{enable_variation=""}jQuery("table.woocommerce_attributes tbody").append('')}else{var g=jQuery("table.woocommerce_attributes tbody tr."+j);jQuery("table.woocommerce_attributes tbody").append(jQuery(g));jQuery(g).show();b()}a()});jQuery("button.hide_row").live("click",function(){var g=confirm("Remove this attribute?");if(g){jQuery(this).parent().parent().find("select, input[type=text]").val("");jQuery(this).parent().parent().hide();a()}return false});jQuery("#attributes_list button.remove_row").live("click",function(){var g=confirm("Remove this attribute?");if(g){jQuery(this).parent().parent().remove();a();b()}return false});jQuery("table.woocommerce_attributes tbody").sortable({items:"tr",cursor:"move",axis:"y",scrollSensitivity:40,helper:function(h,g){g.children().each(function(){jQuery(this).width(jQuery(this).width())});return g},start:function(g,h){h.item.css("background-color","#f6f6f6")},stop:function(g,h){h.item.removeAttr("style");b()}});jQuery(".multi_select_products button").live("click",function(){var j=jQuery(this).parent().parent().parent().parent();if(jQuery(this).parent().parent().is(".multi_select_products_target")){jQuery(this).parent().remove()}else{var h=jQuery(".multi_select_products_target",jQuery(j));var g=jQuery("li[rel="+jQuery(this).parent().attr("rel")+"]",h);if(jQuery(g).size()>0){return false}jQuery(this).parent().clone().appendTo(h).find("button").html("X").parent().find("input").val(jQuery(this).parent().attr("rel"))}});var f;jQuery(".multi_select_products #product_search").bind("keyup click",function(){jQuery(".multi_select_products_source").addClass("loading");jQuery(".multi_select_products_source li:not(.product_search)").remove();if(f){f.abort()}var j=jQuery(this).val();var g=this;var h=jQuery(this).attr("rel");if(j.length<3){jQuery(".multi_select_products_source").removeClass("loading");return}var k={name:h,search:encodeURI(j),action:"woocommerce_upsell_crosssell_search_products",security:woocommerce_writepanel_params.upsell_crosssell_search_products_nonce};f=jQuery.ajax({url:woocommerce_writepanel_params.ajax_url,data:k,type:"POST",success:function(l){jQuery(".multi_select_products_source").removeClass("loading");jQuery(".multi_select_products_source li:not(.product_search)").remove();jQuery(g).parent().parent().append(l)}})})}); \ No newline at end of file +jQuery(function(d){jQuery("form#post").bind("keypress",function(g){if(g.keyCode==13){return false}});jQuery("ul.tabs").show();jQuery("div.panel-wrap").each(function(){jQuery("div.panel:not(div.panel:first)",this).hide()});jQuery("ul.tabs a").click(function(){var g=jQuery(this).closest("div.panel-wrap");jQuery("ul.tabs li",g).removeClass("active");jQuery(this).parent().addClass("active");jQuery("div.panel",g).hide();jQuery(jQuery(this).attr("href")).show();return false});jQuery("#order_items_list button.remove_row").live("click",function(){var g=confirm(woocommerce_writepanel_params.remove_item_notice);if(g){jQuery(this).closest("tr.item").hide();jQuery("input",jQuery(this).closest("tr.item")).val("")}return false});jQuery("button.calc_totals").live("click",function(){var p=confirm(woocommerce_writepanel_params.cart_total);if(p){var h=jQuery("#order_items_list tr.item").size();var n=0;var o=jQuery("input#_order_discount").val();var g=jQuery("input#_order_shipping").val();var k=parseFloat(jQuery("input#_order_shipping_tax").val());var l=0;var j=0;var m=0;if(!o){o=0}if(!g){g=0}if(!k){k=0}if(h>0){for(i=0;i0){taxRate=itemTax/100;itemTaxAmount=((itemCost*taxRate)*100);itemTaxAmount=itemTaxAmount.toFixed(2);totalItemTax=Math.round(itemTaxAmount)/100;totalItemTax=totalItemTax*itemQty}j=j+totalItemCost;l=l+totalItemTax}}n=j;m=parseFloat(n)+parseFloat(l)-parseFloat(o)+parseFloat(g)+parseFloat(k);if(m<0){m=0}jQuery("input#_order_subtotal").val(n.toFixed(2));jQuery("input#_order_tax").val(l.toFixed(2));jQuery("input#_order_shipping_tax").val(k.toFixed(2));jQuery("input#_order_total").val(m.toFixed(2))}return false});jQuery("button.add_shop_order_item").click(function(){var j=jQuery("select.add_item_id").val();if(j){jQuery("table.woocommerce_order_items").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_writepanel_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:0.6}});var g=jQuery("table.woocommerce_order_items tbody tr.item").size();var h={action:"woocommerce_add_order_item",item_to_add:jQuery("select.add_item_id").val(),index:g,security:woocommerce_writepanel_params.add_order_item_nonce};jQuery.post(woocommerce_writepanel_params.ajax_url,h,function(k){jQuery("table.woocommerce_order_items tbody#order_items_list").append(k);jQuery("table.woocommerce_order_items").unblock();jQuery("select.add_item_id").css("border-color","").val("");jQuery(".tips").easyTooltip()})}else{jQuery("select.add_item_id").css("border-color","red")}});jQuery("button.add_meta").live("click",function(){var g=jQuery(this).closest("tr.item").attr("rel");jQuery(this).closest("table.meta").find(".meta_items").append('');return false});jQuery("button.remove_meta").live("click",function(){var g=confirm("Remove this meta key?");if(g){jQuery(this).closest("tr").remove()}return false});jQuery("button.billing-same-as-shipping").live("click",function(){var g=confirm(woocommerce_writepanel_params.copy_billing);if(g){jQuery("input#shipping_first_name").val(jQuery("input#billing_first_name").val());jQuery("input#shipping_last_name").val(jQuery("input#billing_last_name").val());jQuery("input#shipping_company").val(jQuery("input#billing_company").val());jQuery("input#shipping_address_1").val(jQuery("input#billing_address_1").val());jQuery("input#shipping_address_2").val(jQuery("input#billing_address_2").val());jQuery("input#shipping_city").val(jQuery("input#billing_city").val());jQuery("input#shipping_postcode").val(jQuery("input#billing_postcode").val());jQuery("input#shipping_country").val(jQuery("input#billing_country").val());jQuery("input#shipping_state").val(jQuery("input#billing_state").val())}return false});d("select#product-type").change(function(){var g=jQuery(this).val();d("#woocommerce-product-type-options .inside > div").hide();d("#"+g+"_product_options").show();if(g=="variable"){jQuery(".stock_fields, .manage_stock_field, .tax_tab, .options_group.pricing").show();jQuery(".options_group.grouping, .options_group.pricing").val("").hide();jQuery("td.enable_variation, th.enable_variation").show();jQuery("input#manage_stock").change()}else{if(g=="simple"){jQuery(".stock_fields, .manage_stock_field, .tax_tab, .options_group.pricing").show();jQuery(".options_group.grouping").show();jQuery("td.enable_variation, th.enable_variation").hide();jQuery("input#manage_stock").change()}else{if(g=="grouped"){jQuery(".stock_fields, .manage_stock_field, .tax_tab, .options_group.pricing").hide();jQuery(".options_group.grouping").val("").hide();jQuery("td.enable_variation, th.enable_variation").hide();jQuery("input#manage_stock").change()}else{if(g=="downloadable"){jQuery(".stock_fields, .manage_stock_field, .tax_tab, .options_group.pricing").show();jQuery(".options_group.grouping").show();jQuery("td.enable_variation, th.enable_variation").hide();jQuery("input#manage_stock").change()}else{if(g=="virtual"){jQuery(".stock_fields, .manage_stock_field, .tax_tab, .options_group.pricing").show();jQuery(".options_group.grouping").show();jQuery("td.enable_variation, th.enable_variation").hide();jQuery("input#manage_stock").change()}}}}}d("body").trigger("woocommerce-product-type-change",g,d(this))}).change();jQuery("input#manage_stock").change(function(){if(jQuery(this).is(":checked")){jQuery("div.stock_fields").show()}else{jQuery("div.stock_fields").hide()}}).change();var e=jQuery("#sale_price_dates_from, #sale_price_dates_to").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:true,showOn:"button",buttonImage:woocommerce_writepanel_params.calendar_image,buttonImageOnly:true,onSelect:function(j){var k=this.id=="sale_price_dates_from"?"minDate":"maxDate",g=jQuery(this).data("datepicker"),h=jQuery.datepicker.parseDate(g.settings.dateFormat||jQuery.datepicker._defaults.dateFormat,j,g.settings);e.not(this).datepicker("option",k,h)}});jQuery(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:true,showOn:"button",buttonImage:woocommerce_writepanel_params.calendar_image,buttonImageOnly:true});jQuery("#attributes_list select.multiselect").multiselect({noneSelectedText:woocommerce_writepanel_params.select_terms,selectedList:4});var c=jQuery("#attributes_list").children("tr").get();c.sort(function(h,g){var k=jQuery(h).attr("rel");var j=jQuery(g).attr("rel");return(kj)?1:0});jQuery(c).each(function(g,h){jQuery("#attributes_list").append(h)});function a(){jQuery("table.woocommerce_attributes, table.woocommerce_variable_attributes").each(function(){if(jQuery("tbody tr",this).size()==0){jQuery(this).parent().hide()}else{jQuery(this).parent().show()}})}a();function b(){jQuery("#attributes_list tr").each(function(g,h){jQuery(".attribute_position",h).val(parseInt(jQuery(h).index("#attributes_list tr")))})}jQuery("button.add_attribute").click(function(){var h=jQuery("table.woocommerce_attributes tbody tr").size();var j=jQuery("select.attribute_taxonomy").val();if(!j){var k=jQuery("select#product-type").val();if(k!="variable"){enable_variation='style="display:none;"'}else{enable_variation=""}jQuery("table.woocommerce_attributes tbody").append('')}else{var g=jQuery("table.woocommerce_attributes tbody tr."+j);jQuery("table.woocommerce_attributes tbody").append(jQuery(g));jQuery(g).show();b()}a()});jQuery("button.hide_row").live("click",function(){var g=confirm("Remove this attribute?");if(g){jQuery(this).parent().parent().find("select, input[type=text]").val("");jQuery(this).parent().parent().hide();a()}return false});jQuery("#attributes_list button.remove_row").live("click",function(){var g=confirm("Remove this attribute?");if(g){jQuery(this).parent().parent().remove();a();b()}return false});jQuery("table.woocommerce_attributes tbody").sortable({items:"tr",cursor:"move",axis:"y",scrollSensitivity:40,helper:function(h,g){g.children().each(function(){jQuery(this).width(jQuery(this).width())});return g},start:function(g,h){h.item.css("background-color","#f6f6f6")},stop:function(g,h){h.item.removeAttr("style");b()}});jQuery(".multi_select_products button").live("click",function(){var j=jQuery(this).parent().parent().parent().parent();if(jQuery(this).parent().parent().is(".multi_select_products_target")){jQuery(this).parent().remove()}else{var h=jQuery(".multi_select_products_target",jQuery(j));var g=jQuery("li[rel="+jQuery(this).parent().attr("rel")+"]",h);if(jQuery(g).size()>0){return false}jQuery(this).parent().clone().appendTo(h).find("button").html("X").parent().find("input").val(jQuery(this).parent().attr("rel"))}});var f;jQuery(".multi_select_products #product_search").bind("keyup click",function(){jQuery(".multi_select_products_source").addClass("loading");jQuery(".multi_select_products_source li:not(.product_search)").remove();if(f){f.abort()}var j=jQuery(this).val();var g=this;var h=jQuery(this).attr("rel");if(j.length<3){jQuery(".multi_select_products_source").removeClass("loading");return}var k={name:h,search:encodeURI(j),action:"woocommerce_upsell_crosssell_search_products",security:woocommerce_writepanel_params.upsell_crosssell_search_products_nonce};f=jQuery.ajax({url:woocommerce_writepanel_params.ajax_url,data:k,type:"POST",success:function(l){jQuery(".multi_select_products_source").removeClass("loading");jQuery(".multi_select_products_source li:not(.product_search)").remove();jQuery(g).parent().parent().append(l)}})})}); \ No newline at end of file diff --git a/readme.txt b/readme.txt index 714cbcf4d9e..1e0fba417e2 100644 --- a/readme.txt +++ b/readme.txt @@ -80,6 +80,7 @@ For further documentation on using WooCommerce, please sign up for free at http: * Admin JS cleanup * Removed error message when clicking buttons to view variations/grouped * Drag and drop term ordering (so variation options can be sorted) +* Pay page after invoicing fix = 1.0.3 - 06/10/2011 = * Several minor fixes/tweaks diff --git a/shortcodes/shortcode-pay.php b/shortcodes/shortcode-pay.php index 5aab72e53e8..9a0bd47ac0d 100644 --- a/shortcodes/shortcode-pay.php +++ b/shortcodes/shortcode-pay.php @@ -40,9 +40,7 @@ function woocommerce_pay() { // Update payment method if ($order->order_total > 0 ) : $payment_method = woocommerce_clean($_POST['payment_method']); - $data = (array) maybe_unserialize( get_post_meta( $order_id, 'order_data', true ) ); - $data['payment_method'] = $payment_method; - update_post_meta( $order_id, 'order_data', $data ); + update_post_meta( $order_id, '_payment_method', $payment_method); $available_gateways = $woocommerce->payment_gateways->get_available_payment_gateways(); diff --git a/woocommerce_actions.php b/woocommerce_actions.php index 4caba78bcfd..f76cad63e9b 100644 --- a/woocommerce_actions.php +++ b/woocommerce_actions.php @@ -215,7 +215,7 @@ function woocommerce_add_order_item() { - +