Shifting one element in woocommerce cart table

So I have a plugin which provides two custom thumbnails and some other information in the cart table for checkout for that product, however it does not replace the original thumbnail so its as though you have 2 sets of images which is not very pretty. So instead of modifying the code of the plugin I want to swap out the original thumbnail with the plugin generated thumbnail. One idea was if there is a javascript method (or some other method for that matter) to look in a row for class=light-dropshaddow and take its parent element which is shown below:

<p> <a href=”https://www.shuanandlebowitz.website/tshirtecommerce/uploaded/2018/10//cart-front-1538965970.png” rel=”lightbox[pp_gal]” class=”lightboxhover”><img src=”https://www.shuanandlebowitz.website/tshirtecommerce/uploaded/2018/10//cart-front-1538965970.png” class=”light-dropshaddow” style=”width:90px”></a> <a href=”https://www.shuanandlebowitz.website/tshirtecommerce/uploaded/2018/10//cart-back-1538965970.png” rel=”lightbox[pp_gal]” class=”lightboxhover”><img src=”https://www.shuanandlebowitz.website/tshirtecommerce/uploaded/2018/10//cart-back-1538965970.png” class=”light-dropshaddow” style=”width:90px”></a></p>

And swap it with the following item in the same row as shown in this column of that row:

<td class=”product-thumbnail”>
<a href=”https://www.shuanandlebowitz.website/product/the-triblend-tee/”><img width=”300″ height=”300″ src=”https://www.shuanandlebowitz.website/wp-content/uploads/2018/06/Aqua-Triblend-Front-300×300.png” class=”attachment-woocommerce_thumbnail size-woocommerce_thumbnail wp-post-image” alt=”” srcset=”https://www.shuanandlebowitz.website/wp-content/uploads/2018/06/Aqua-Triblend-Front-300×300.png 300w, https://www.shuanandlebowitz.website/wp-content/uploads/2018/06/Aqua-Triblend-Front-150×150.png 150w, https://www.shuanandlebowitz.website/wp-content/uploads/2018/06/Aqua-Triblend-Front-550×550.png 550w, https://www.shuanandlebowitz.website/wp-content/uploads/2018/06/Aqua-Triblend-Front-100×100.png 100w” sizes=”(max-width: 300px) 100vw, 300px”></a> </td>

Read more here:: Shifting one element in woocommerce cart table

Leave a Reply

Your email address will not be published. Required fields are marked *