Skip to content

Instantly share code, notes, and snippets.

@webtoffee-git
Created March 20, 2024 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webtoffee-git/624a5fe68a768ba98dd24363cb95dba7 to your computer and use it in GitHub Desktop.
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)
<?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