• Resolved Antonio Gallo

    (@antoniogallo)


    I tried to modify class-alg-export-fields-helper.php
    to add a custom field: billing_codice_rivendita

    But i get this error during the export:

    Fatal error: Uncaught Error: Call to undefined method WC_Order::get_billing_codice_rivendita() in alg-wc-export-functions.php:47

    is there a way to add custom WC fields to the report?

    SOLVED:
    logic how to return value for the custom field must be added to
    class-alg-exporter-customers.php
    class-alg-exporter-orders.php

    FEATURE REQUEST:
    it would be nice that you could use standard filters
    to get the list of billing/shipping fields from WC
    so that we don’t have to patch the plugin code to generate the export

Viewing 1 replies (of 1 total)
  • Plugin Contributor Algoritmika

    (@algoritmika)

    Hi @antoniogallo,

    Happy to hear you solved it. Changing plugin’s code is a solution, however I think you could achieve the same without changing the code. When you open plugin’s settings, e.g. in “WooCommerce > Settings > Export > Orders”, you can find “Additional Export Orders Meta Fields” section there. If you add _billing_codice_rivendita to “Value” field there, you should be able to export the field (if that wouldn’t work, please try it without the underscore symbol: billing_codice_rivendita).

Viewing 1 replies (of 1 total)
  • The topic ‘[SOLVED] how to add a custom field to the report?’ is closed to new replies.