Skip to content

Instantly share code, notes, and snippets.

@reachkamrul
Last active October 12, 2021 12:50
Show Gist options
  • Save reachkamrul/9ce6e66b324b3555f96c3002091f6f58 to your computer and use it in GitHub Desktop.
Save reachkamrul/9ce6e66b324b3555f96c3002091f6f58 to your computer and use it in GitHub Desktop.
// Remove WooCommerce Variable Add to cart System
function removeVariableCart(){
var linkText = 'Read More'; // Give your read more text
$table.find('.ninja_clmn_nm_woo_product_buy').each(function(){
jQuery(this).find('.nt_woo_attribute').hide();
jQuery(this).prev('.ninja_clmn_nm_woo_product_quantity').find('.quantity').hide();
jQuery(this).find('.wc_product_variable').css('opacity', '1');
var linkVal = jQuery(this).find('#ntb_woo_product_variation').attr('href');
jQuery(this).find('#ntb_woo_product_variation').replaceWith('<a href="'+linkVal+'" class="nt_button_woo button">'+linkText+ '</a>');
})
};
$(document).ready(function(){
removeVariableCart();
});
$table.on('after.ft.filtering', function() {
removeVariableCart();
});
$table.on('after.ft.paging', function() {
removeVariableCart();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment