Created
June 19, 2019 12:15
-
-
Save rwkyyy/feae034b03dedaf273f4911e21b68958 to your computer and use it in GitHub Desktop.
restore woocommerce refund field (WooCommerce 3.6+)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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