Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Woo: если товар простой, вариативный, сгруппированный или внешний/партнёрский
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