fixed refunds cancel button action

This commit is contained in:
claudiosmweb 2014-07-25 13:32:16 -03:00
parent 5e663a7fa8
commit acaee93236
5 changed files with 12 additions and 12 deletions

View File

@ -310,7 +310,7 @@ jQuery( function ( $ ) {
$( 'div.wc-order-refund-items' ).slideDown();
$( 'div.wc-order-bulk-actions' ).slideUp();
$( 'div.wc-order-totals-items' ).slideUp();
$( '#woocommerce-order-items .refund' ).show();
$( '#woocommerce-order-items div.refund' ).show();
$( '.wc-order-edit-line-item' ).hide();
return false;
@ -319,7 +319,7 @@ jQuery( function ( $ ) {
$( this ).closest( 'div.wc-order-data-row' ).slideUp();
$( 'div.wc-order-bulk-actions' ).slideDown();
$( 'div.wc-order-totals-items' ).slideDown();
$( '#woocommerce-order-items .refund' ).hide();
$( '#woocommerce-order-items div.refund' ).hide();
$( '.wc-order-edit-line-item' ).show();
// Reload the items

File diff suppressed because one or more lines are too long

View File

@ -25,8 +25,8 @@ if ( ! defined( 'ABSPATH' ) ) {
<td class="line_cost" width="1%">
<div class="view">
<?php
echo ( isset( $item['line_total'] ) ) ? wc_price( wc_round_tax_total( $item['line_total'] ) ) : '';
<?php
echo ( isset( $item['line_total'] ) ) ? wc_price( wc_round_tax_total( $item['line_total'] ) ) : '';
if ( $refunded = $order->get_total_refunded_for_item( $item_id, 'fee' ) ) {
printf( '<small class="refunded">' . __( 'Refunded %s' ) . '</small>', wc_price( $refunded ) );
@ -54,8 +54,8 @@ if ( ! defined( 'ABSPATH' ) ) {
<td class="line_tax" width="1%">
<div class="view">
<?php
echo ( '' != $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ) ) : '&ndash;';
<?php
echo ( '' != $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ) ) : '&ndash;';
if ( $refunded = $order->get_tax_refunded_for_item( $item_id, $tax_item_id, 'fee' ) ) {
printf( '<small class="refunded">' . __( 'Refunded %s' ) . '</small>', wc_price( $refunded ) );

View File

@ -150,7 +150,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<td class="quantity" width="1%">
<div class="view">
<?php
<?php
echo ( isset( $item['qty'] ) ) ? esc_html( $item['qty'] ) : '';
if ( $refunded_qty = $order->get_qty_refunded_for_item( $item_id ) ) {

View File

@ -50,8 +50,8 @@ if ( ! defined( 'ABSPATH' ) ) {
<td class="line_cost" width="1%">
<div class="view">
<?php
echo ( isset( $item['cost'] ) ) ? wc_price( wc_round_tax_total( $item['cost'] ) ) : '';
<?php
echo ( isset( $item['cost'] ) ) ? wc_price( wc_round_tax_total( $item['cost'] ) ) : '';
if ( $refunded = $order->get_total_refunded_for_item( $item_id, 'shipping' ) ) {
printf( '<small class="refunded">' . __( 'Refunded %s' ) . '</small>', wc_price( $refunded ) );
@ -79,8 +79,8 @@ if ( ! defined( 'ABSPATH' ) ) {
<td class="line_tax" width="1%">
<div class="view">
<?php
echo ( '' != $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ) ) : '&ndash;';
<?php
echo ( '' != $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ) ) : '&ndash;';
if ( $refunded = $order->get_tax_refunded_for_item( $item_id, $tax_item_id, 'shipping' ) ) {
printf( '<small class="refunded">' . __( 'Refunded %s' ) . '</small>', wc_price( $refunded ) );