• I’m using the Advanced Order Export for WooCommerce (Pro) plugin and trying to customize the export to achieve the following:

    • Goal: Export product sales grouped by product category with the total quantity sold for each category.

    For example, instead of exporting individual order details, I want the export to look like this:

    Category | Quantity Sold

    Ticket1 | 29

    Ticket2 | 32

    Ticket3 | 50

    I’ve noticed there is a Custom PHP code to modify output section in the plugin settings, and I’m trying to use it to calculate and display the total number of items sold per category, but I haven’t been able to get it working.

    If anyone has experience using the plugin’s custom PHP feature to achieve similar goals, I’d appreciate any advice or code examples!

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

    (@algolplus)

    hello

    Does each product belong to ONE category only ?

    Thread Starter azureconcept

    (@azureconcept)

    Yes! Each product belongs to ONLY one category. Not multiple.

    Plugin Author algol.plus

    (@algolplus)

    hi

    1. please enable mode “Summary report by products”, it’s checkbox below Date range
    2. open “Setup fields”, add fied “Category” to export
    3. open “MIsc Settings” (the section is at bottom of page too) and add this code

    add_filter( "woe_summary_products_adjust_key", function($key, $product, $product_item, $order, $item ){
    return $item['category'];
    },10,5);

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.