• Resolved gb1231

    (@gb1231)


    Hello

    I need to limit refunds to full refunds (= no partial refunds). How can I set the refund amount field to readonly and automatically set it to the order amount?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Saif

    (@babylon1999)

    Hello @gb1231,

    If I understand you correctly, you want to disable the following two fields and make them read-only.


    Link to image.


    This is a bit outside our scope of support here in the forums. That said, went ahead and wrote this simple snippet to make both fields read-only. You can insert it using the Simple Custom CSS and JS plugin.

    document.getElementsByClassName("refund-items")[0].addEventListener("click", myFunction); 
    
    function myFunction() {
      document.getElementsByClassName('refund_line_tax')[0].readOnly = true;
      document.getElementsByClassName('refund_line_total')[0].readOnly = true;
    } 

    Please make sure to make the snippet load in the footer and select “In Admin” as highlighted below.


    Link to image.


    The end result is this, you can only edit the quantity of the product to be refunded.


    Link to image.


    Hope this helps!

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Since we haven’t heard from you for a while, I’m marking this as resolved. We’re always here to help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Woocommerce: Refund amount – set to “readonly”’ is closed to new replies.