Created
August 4, 2020 19:59
-
-
Save DxDiagDx/7638dcdd420d75ddfa3e7667707ef7f7 to your computer and use it in GitHub Desktop.
Woo: если товар простой, вариативный, сгруппированный или внешний/партнёрский
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
add_action( 'woocommerce_after_single_product_summary', 'bbloomer_single_product_type' ); | |
function bbloomer_single_product_type() { | |
if( $product->is_type( 'simple' ) ){ | |
// do something | |
} elseif( $product->is_type( 'variable' ) ){ | |
// do something | |
} elseif( $product->is_type( 'external' ) ){ | |
// do something | |
} elseif( $product->is_type( 'grouped' ) ){ | |
// do something | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment