Created
July 18, 2024 12:10
-
-
Save webtoffee-git/c0ee23e40d782dc2f4a86216a5589c14 to your computer and use it in GitHub Desktop.
Code to disable the assembly cost option provided by Product Assembly / Gift Wrap / Plugin - By WebToffee (WebToffee WooCommerce Gift Cards)
This file contains 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
<?php //Do not copy this line of code | |
function wt_admin_show_assembly_cost_on_giftcard() { | |
?> | |
<script> | |
jQuery(document).ready(function() { | |
setTimeout(function() { | |
if(jQuery('._wt_gc_amounts_field').length){ | |
jQuery('._has_assembly_field').insertAfter('._wt_gc_amounts_field'); | |
jQuery('._disable_assembly_field').insertAfter('._wt_gc_amounts_field'); | |
jQuery('._assembly_cost_field').insertAfter('._wt_gc_amounts_field'); | |
jQuery('._has_assembly_field ._assembly_cost_field ._disable_assembly_field').show(); | |
} | |
}, 3000); | |
}); | |
</script> | |
<?php | |
} | |
add_action('admin_footer', 'wt_admin_show_assembly_cost_on_giftcard'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment