Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Prevent products being purchased from archive
- * @return Boolean
- */
- function pewc_filter_is_purchasable( $is_purchasable, $product ) {
- if( is_archive() ) {
- return false;
- }
- return $is_purchasable;
- }
- add_filter( 'woocommerce_is_purchasable', 'pewc_filter_is_purchasable', 10, 2 );
Add Comment
Please, Sign In to add comment