Created
September 11, 2015 06:32
-
-
Save digisavvy/aeba1f5217936d08f158 to your computer and use it in GitHub Desktop.
Check WooCommerce Product Type
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 | |
if( $product->is_type( 'simple' ) ){ | |
echo "is simple product"; | |
} elseif( $product->is_type( 'variable' ) ){ | |
echo "is variable"; | |
} elseif( $product->is_type( 'composite' ) ){ | |
echo "is composite"; | |
} else { | |
echo "derpage"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment