woocommerce_grouped_add_to_cart

Output the grouped product add to cart area.

Description

woocommerce_grouped_add_to_cart(); 

Usage

  1. if ( !function_exists( 'woocommerce_grouped_add_to_cart' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-template-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = woocommerce_grouped_add_to_cart(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-template-functions.php  
  1. function woocommerce_grouped_add_to_cart() { 
  2. global $product; 
  3.  
  4. $products = array_filter( array_map( 'wc_get_product', $product->get_children() ) ); 
  5.  
  6. if ( $products ) { 
  7. usort( $products, 'wc_products_array_orderby_menu_order' ); 
  8.  
  9. wc_get_template( 'single-product/add-to-cart/grouped.php', array( 
  10. 'grouped_product' => $product,  
  11. 'grouped_products' => $products,  
  12. 'quantites_required' => false,  
  13. ) );