💸 Get more for your money each Wednesday with big savings on selected extensions. Shop this week's deals
Product Icon

Xero for WooCommerce

by Woo
Save time with automated sync between WooCommerce and your Xero account.

Store Woocommerce line item or product ID in WC_XR_Line_Item

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

Author

Yvan Seth

Current Status

Open

Last updated: January 31, 2023

0 comments

Log in to comment on this feature request.

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.