Category addition bug and pay page fix
This commit is contained in:
parent
f8447c7a46
commit
d61167f060
|
@ -140,10 +140,12 @@ function woocommerce_category_thumbnail_field_save( $term_id, $tt_id, $taxonomy
|
||||||
/**
|
/**
|
||||||
* Reorder on term insertion
|
* 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 ) {
|
function woocommerce_create_term( $term_id, $tt_id, $taxonomy ) {
|
||||||
|
|
||||||
|
if (!$taxonomy=='product_cat' && !strstr($taxonomy, 'pa_')) return;
|
||||||
|
|
||||||
$next_id = null;
|
$next_id = null;
|
||||||
|
|
||||||
$term = get_term($term_id, $taxonomy);
|
$term = get_term($term_id, $taxonomy);
|
||||||
|
@ -164,7 +166,7 @@ function woocommerce_create_term( $term_id, $tt_id, $taxonomy ) {
|
||||||
/**
|
/**
|
||||||
* Delete terms metas on deletion
|
* 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 ) {
|
function woocommerce_delete_term( $term_id, $tt_id, $taxonomy ) {
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ function woocommerce_order_items_meta_box($post) {
|
||||||
<tbody id="order_items_list">
|
<tbody id="order_items_list">
|
||||||
|
|
||||||
<?php $loop = 0; if (sizeof($order_items)>0 && isset($order_items[0]['id'])) foreach ($order_items as $item) :
|
<?php $loop = 0; if (sizeof($order_items)>0 && isset($order_items[0]['id'])) foreach ($order_items as $item) :
|
||||||
|
|
||||||
if (isset($item['variation_id']) && $item['variation_id'] > 0) :
|
if (isset($item['variation_id']) && $item['variation_id'] > 0) :
|
||||||
$_product = &new woocommerce_product_variation( $item['variation_id'] );
|
$_product = &new woocommerce_product_variation( $item['variation_id'] );
|
||||||
else :
|
else :
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
#woocommerce-order-items .buttons button{margin:2px 0 0 0;}
|
#woocommerce-order-items .buttons button{margin:2px 0 0 0;}
|
||||||
#woocommerce-order-items .buttons-alt{float:right;padding-right:6px;}
|
#woocommerce-order-items .buttons-alt{float:right;padding-right:6px;}
|
||||||
#woocommerce-order-items h3 small{color:#999;}
|
#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{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%;}dl.totals dd input{width:100%;vertical-align:middle;float:left;font-size:1em;margin:0 !important;}
|
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.first{width:49%;float:left;}
|
||||||
dl.totals dd input.last{width:49%;float:right;}
|
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;}
|
.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;}
|
||||||
|
|
|
@ -78,12 +78,16 @@ dl.totals {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 2em;
|
line-height: 2em;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
dd {
|
dd {
|
||||||
line-height: 2em;
|
line-height: 2em;
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
float: left;
|
float: left;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
input {
|
input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
|
@ -57,6 +57,7 @@ jQuery( function($){
|
||||||
|
|
||||||
if (!itemCost) itemCost = 0;
|
if (!itemCost) itemCost = 0;
|
||||||
if (!itemTax) itemTax = 0;
|
if (!itemTax) itemTax = 0;
|
||||||
|
if (!itemQty) itemQty = 0;
|
||||||
|
|
||||||
totalItemTax = 0;
|
totalItemTax = 0;
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -80,6 +80,7 @@ For further documentation on using WooCommerce, please sign up for free at http:
|
||||||
* Admin JS cleanup
|
* Admin JS cleanup
|
||||||
* Removed error message when clicking buttons to view variations/grouped
|
* Removed error message when clicking buttons to view variations/grouped
|
||||||
* Drag and drop term ordering (so variation options can be sorted)
|
* Drag and drop term ordering (so variation options can be sorted)
|
||||||
|
* Pay page after invoicing fix
|
||||||
|
|
||||||
= 1.0.3 - 06/10/2011 =
|
= 1.0.3 - 06/10/2011 =
|
||||||
* Several minor fixes/tweaks
|
* Several minor fixes/tweaks
|
||||||
|
|
|
@ -40,9 +40,7 @@ function woocommerce_pay() {
|
||||||
// Update payment method
|
// Update payment method
|
||||||
if ($order->order_total > 0 ) :
|
if ($order->order_total > 0 ) :
|
||||||
$payment_method = woocommerce_clean($_POST['payment_method']);
|
$payment_method = woocommerce_clean($_POST['payment_method']);
|
||||||
$data = (array) maybe_unserialize( get_post_meta( $order_id, 'order_data', true ) );
|
update_post_meta( $order_id, '_payment_method', $payment_method);
|
||||||
$data['payment_method'] = $payment_method;
|
|
||||||
update_post_meta( $order_id, 'order_data', $data );
|
|
||||||
|
|
||||||
$available_gateways = $woocommerce->payment_gateways->get_available_payment_gateways();
|
$available_gateways = $woocommerce->payment_gateways->get_available_payment_gateways();
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ function woocommerce_add_order_item() {
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<input type="hidden" name="item_id[<?php echo $index; ?>]" value="<?php echo esc_attr( $_product->id ); ?>" />
|
<input type="hidden" name="item_id[<?php echo $index; ?>]" value="<?php echo esc_attr( $_product->id ); ?>" />
|
||||||
<input type="hidden" name="item_name[<?php echo $index; ?>]" value="<?php echo esc_attr( $_product->get_title() ); ?>" />
|
<input type="hidden" name="item_name[<?php echo $index; ?>]" value="<?php echo esc_attr( $_product->get_title() ); ?>" />
|
||||||
<input type="hidden" name="item_variation[<?php echo $loop; ?>]" value="<?php if (isset($_product->variation_id)) echo $_product->variation_id; ?>" />
|
<input type="hidden" name="item_variation[<?php echo $index; ?>]" value="<?php if (isset($_product->variation_id)) echo $_product->variation_id; ?>" />
|
||||||
<button type="button" class="remove_row button">×</button>
|
<button type="button" class="remove_row button">×</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in New Issue