Skip to main content
wordpressWoocommerce

WooCommerce custom code to hide some theme elements

// Woocommerce, hide the customer reviews ui jQuery(document).ready(function(){ jQuery('.woocommerce .woocommerce-product-rating').hide(); jQuery('.woocommerce .edgtf-social-share-holder').hide(); jQuery('.woocommerce-tabs .edgtf-tabs-nav').find('li').eq(1).hide(); jQuery('.woocommerce-tabs .edgtf-tabs-nav').find('li').eq(2).hide(); // hide related products jQuery('.woocommerce .related.products').hide(); });
priyankmaniar
June 23, 2023
Woocommercewordpress

WooCommerce: Buy in multiples of 5

add_action( 'woocommerce_check_cart_items', 'woocommerce_check_cart_quantities' ); function woocommerce_check_cart_quantities() { $multiples = 5; $total_products = 0; foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) { $total_products += $values;…
priyankmaniar
March 1, 2020