Created
March 20, 2024 13:26
-
-
Save webtoffee-git/624a5fe68a768ba98dd24363cb95dba7 to your computer and use it in GitHub Desktop.
To change the position of delete button in wishlist table - By WebToffee (Wishlist for WooCommerce)
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 | |
add_action('wp_footer','wt_rp_wishlist_delete_btn',10); | |
function wt_rp_wishlist_delete_btn() { | |
?> | |
<script> | |
jQuery(document).ready(function (){ | |
jQuery('.wt_frontend_wishlist_table tbody tr').each(function() { | |
var table_row = jQuery(this); | |
var delete_button = table_row.find('.remove_wishlist_single'); | |
delete_button.appendTo(table_row.find('td:last')); | |
delete_button_img = jQuery('.remove_wishlist_single img'); | |
delete_button_img.css({"display": "inline", "margin-left": "12px" }); | |
}); | |
}); | |
</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment