parent
6afc566de4
commit
763c8e8018
|
@ -972,11 +972,17 @@ if ( ! function_exists( 'woocommerce_grouped_add_to_cart' ) ) {
|
|||
function woocommerce_grouped_add_to_cart() {
|
||||
global $product;
|
||||
|
||||
wc_get_template( 'single-product/add-to-cart/grouped.php', array(
|
||||
'grouped_product' => $product,
|
||||
'grouped_products' => array_map( 'wc_get_product', $product->get_children() ),
|
||||
'quantites_required' => false,
|
||||
) );
|
||||
$products = array_filter( array_map( 'wc_get_product', $product->get_children() ) );
|
||||
|
||||
if ( $products ) {
|
||||
usort( $products, 'wc_products_array_orderby_menu_order' );
|
||||
|
||||
wc_get_template( 'single-product/add-to-cart/grouped.php', array(
|
||||
'grouped_product' => $product,
|
||||
'grouped_products' => $products,
|
||||
'quantites_required' => false,
|
||||
) );
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( ! function_exists( 'woocommerce_variable_add_to_cart' ) ) {
|
||||
|
|
Loading…
Reference in New Issue