Product Icon

FreeAgent Sync for WooCommerce

Providing a flexible integration between your FreeAgent account and your WooCommerce stores

Ability to select a Project to assign the invoice to

FreeAgent projects are useful to split various projects from eachother.

This feature request would sync with FreeAgent to display the available projects and via a drop-down select a project for all invoices to be assigned to.

Maybe a filter could also be used so certain products could be posted to different projects, but initially a simply drop-down in the portal would be a good start.

Author

Christopher Peacock

Current Status

Planned

Last updated: January 8, 2025

1 comment

Log in to comment on this feature request.

  1. Joey says:
    Product Developer January 8, 2025 10:06 am

    Thanks for the request. We’ll add it to our board for review and check in on votes, it’s likely something we can look to add into a future release. In the meantime we have a filter in place that allows you to filter the invoice details as required with a snippet, here is an example of how you could add in a project:
    /**
    * Customise the invoice details before sending to FreeAgent
    *
    * @param array $invoice
    * @param int $order_id
    * @return array
    */
    function wcfa_customise_invoice( $invoice, $order_id ) {
    $api = new WooCommerce_FreeAgent_Api();
    // Add any custom logic required to determine which project you want based on the order
    // Here I am hardcoding the project ID: 41054
    $invoice[‘project’] = $api->client->api_url . ‘/projects/41054’;

    return $invoice;
    }
    add_filter( ‘wcfa_invoice_details’, ‘wcfa_customise_invoice’, 10, 2 );

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.