Last active
December 13, 2019 10:08
-
-
Save leewillis77/205c63fb41630e33065811a4da8d80fd to your computer and use it in GitHub Desktop.
Control whether variations are included for products
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( 'woocommerce_gpf_include_variations', function ($include_variations, $wc_product) { | |
// Return true if you want to include variations for this $wc_product | |
// Return false if you do not want to include variations for this $wc_product | |
// Return $include_variations to honour the standard behaviour according to the extension settings. | |
return $include_variations; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment