Hello WooCommerce Customizers!
Episode #8Β of my β18 snippets in 18 daysβ challenge (we have 10 days and 10 snippets to go) features a nice HTML hack.
Who doesnβt love hacks? π
I remind you to share on social media and leave blog comments to support my marathon π
Today we take a look at the WooCommerce Loop and specifically at how to disable the link to the products. Some store owner does not want to get people to the single product page, and simply have customers to add to cart!

WooCommerce Snippet: Disable Link to Products @ Loop
Thank you Daymobrew for your very elegant alternative to my initial hack π I love when 2 lines of code achieve a better result than 10!
/** * @snippet Disable Link to Products @ Loop * @how-to Get CustomizeWoo.com FREE * @sourcecode https://businessbloomer.com/?p=19916 * @author Daymobrew * @testedwith WooCommerce 2.6.4 */ remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 ); remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );