Created
December 20, 2023 14:08
-
-
Save andreiglingeanu/11283392bead5bbfcab9e89e4515ed70 to your computer and use it in GitHub Desktop.
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 | |
add_filter( | |
'blocksy:pro:woocommerce-extra:swatches:has-single-product-swatches', | |
function ($has_single_product_swatches) { | |
global $product; | |
$products_without_swatches = [ | |
// list all product IDs that should not have swatches | |
105, | |
106 | |
]; | |
if (in_array($product->get_id(), $products_without_swatches)) { | |
return false; | |
} | |
return $has_single_product_swatches; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment