• We use WPC Product Bundles plugin in our store and export orders using your plugin to generate reports.

    Each bundle item appears individually on the sheet, which is great. But I would like to know if that item is part of a bundle or not. For that, I thought of adding a new column that would inform the parent product of each bundle component.

    I managed to find out that the parent product gets stored with the custom field “_woosb_parent_id” in the database. But it prints the product ID and I needed its SKU to appear in the spreadsheet.

    I also found this code related here, but I don’t know what it does: https://docs.algolplus.com/algol_phone_order/wpc-product-bundles-for-woocommerce-by-wpclever-net/

    Can you help me?

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

    (@algolplus)

    hello

    please, don’t delete column _woosb_parent_id
    just open section “Misc Settings” and add this code

    add_filter( 'woe_fetch_order_product', function($row, $order, $item, $product, $item_meta ){
      if($row['_woosb_parent_id']) {
        $product = wc_get_product($row['_woosb_parent_id']);
        $row['_woosb_parent_id'] = $product ? $product->get_sku() : "";
      }
      return $row;
    },10,5);
    Thread Starter Wiliam Jose Koester

    (@wiliamjk)

    Worked perfectly!
    Thank you very much!

    Plugin Author algol.plus

    (@algolplus)

    You’re very welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WPC Product Bundles: Include column with parent product’ is closed to new replies.