Created
February 3, 2018 23:17
-
-
Save matthijs166/87ae564288a2b166298bd0965240b090 to your computer and use it in GitHub Desktop.
Get the product type of a product
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
global $product; | |
// $product->is_type( $type ) checks the product type, string/array $type ( 'simple', 'grouped', 'variable', 'external' ), returns boolean | |
if ( $product->is_type( 'variable' ) ) {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment