Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created May 31, 2017 07:50
Show Gist options
  • Select an option

  • Save kreamweb/0a51e5bc9fa147c8bd180a5004eb8ca2 to your computer and use it in GitHub Desktop.

Select an option

Save kreamweb/0a51e5bc9fa147c8bd180a5004eb8ca2 to your computer and use it in GitHub Desktop.
Compatibility with Avada
<?php
//Hide add to cart in the loop
add_action('init', 'ywraq_woocommerce_after_shop_loop_item', 0 );
function ywraq_woocommerce_after_shop_loop_item(){
global $avada_woocommerce;
remove_action( 'woocommerce_after_shop_loop_item', array( $avada_woocommerce, 'avada_woocommerce_template_loop_add_to_cart' ), 10 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment