Created
August 29, 2024 08:58
-
-
Save webtoffee-git/de4245c86f8f397246bc920711f91092 to your computer and use it in GitHub Desktop.
Code to hide add to cart button from related products widget - By Webtoffee (Related Products - Product Recommendations for WooCommerce )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //do not copy this line of code | |
add_action('wp_footer',function() { | |
if( class_exists('Custom_Related_Products')) { | |
?> | |
<style> | |
.wt-crp-content-wrapper > .wt_cart_button { | |
display: none; | |
} | |
.wt-related-products > .products > .product > .button.nbo_ajax_add_to_cart { | |
display: none; | |
} | |
</style> | |
<?php | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment