Created
October 8, 2018 06:26
-
-
Save rashmimalpande/cf33420dc69073ed6b2e2b9d1ddeddb5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| add_filter( 'woocommerce_is_purchasable', 'woocommerce_hide_add_to_cart_button', 10, 2 ); | |
| function woocommerce_hide_add_to_cart_button( $is_purchasable = true, $product ) { | |
| return ( $product->get_id() == 335 ? false : $is_purchasable ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment