Skip to content

Instantly share code, notes, and snippets.

@rwkyyy
Created June 19, 2019 12:15
Show Gist options
  • Select an option

  • Save rwkyyy/feae034b03dedaf273f4911e21b68958 to your computer and use it in GitHub Desktop.

Select an option

Save rwkyyy/feae034b03dedaf273f4911e21b68958 to your computer and use it in GitHub Desktop.
restore woocommerce refund field (WooCommerce 3.6+)
add_action('admin_head', 'rwk_refund_field', 999);
function rwk_refund_field() {
$currentPostType = get_post_type();
// filter for shop only
if( $currentPostType != 'shop_order' ) {
return;
}
// remove the blocker
?>
<script>
(function($){
$(document).ready(function(){
$('#refund_amount').removeAttr('readonly');
});
})(jQuery);
</script>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment