Add to cart for simple products only

This commit is contained in:
Mike Jolley 2015-12-02 12:36:56 +00:00
parent 1842f8e3b5
commit 20afa89528
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ class WC_Embed {
$buttons = array();
$button = '<a href="%s" class="wp-embed-more wc-embed-button">%s</a>';
if ( $_product->is_purchasable() && $_product->is_in_stock() ) {
if ( $_product->is_type( 'simple' ) && $_product->is_purchasable() && $_product->is_in_stock() ) {
$buttons[] = sprintf( $button, add_query_arg( 'add-to-cart', get_the_ID(), wc_get_cart_url() ), __( 'Buy Now', 'woocommerce' ) );
}