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.
Planned
Last updated: January 8, 2025
Log in to comment on this feature request.
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 );