• Hey again,

    I’m trying to combine product totals to simplify them but haven’t had much luck so far. We have multiple variations of products for subscriptions but for simplicity would love to combine them into as few products as possible, for example https://imgur.com/HhH6etm

    Would appreciate any help, thanks Alex!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hi

    I created this code, but I had to add new hooks,
    so you must contact me via helpdesk to get beta version.

    //group by product 
    add_filter("woe_summary_products_adjust_key", function($key, $product, $item, $order){
       return $item['product_id'];
    },10,4);
    
    //show parent title
    add_action('woe_summary_products_prepare_product', function($summary_product, $key, $product, $item, $order ) {
      if ( $product->is_type( 'variation' ) )
        $product = wc_get_product($product->get_parent_id());
      if($product)
        $summary_product['name'] = $product->get_name();
      return $summary_product;
    },10,5);
    

    thanks, Alex

    Thread Starter samuelabrooks

    (@samuelabrooks)

    Thanks Alex! I’ll create a ticket right now ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Combining Product Totals’ is closed to new replies.