You’ve very sensibly added hooks for altering how things like the line item “description” is built before sending to Xero. The problem is the full information about the product is lost in building WC_XR_Line_Item… so if I want to use the convenient hook to add some extra product attribute information to the description that is sent to Xero I am a bit lost as all I have to go on is the basic description which is simply not enough in our system. We can have multiple products with the same name but differentiated by different attributes – which is why I want to put some added data from the product into the description.
This is a super trivial case of recording the line item ID and/or product ID in WC_XR_Line_Item and populating is in WC_XR_Line_Item_Manager::build_products
I’ve modified my install of the plugin to have a get_product_id and set_product_it in the line item class… but it’d be nice not to have to manually forward-port the changes for each plugin update.
Thanks,
Yvan
Open
Last updated: January 31, 2023
0 comments
Log in to comment on this feature request.