Custom Field sync Line Item
-
Hello,
I’m trying to attach a custom field (serialnumber) from a line item inside a woocommerce order to a line item inside a hubspot deal.
I found some other post, that showed how to add a custom field to a deal and i tried to find a similar solution for line items inside a deal. This is what i got so far:
add_filter(“hubwoo_line_item_properties”, “customLineItemProperties”, 99, 3); function customLineItemProperties($item_properties, $productId, $orderId){ $item_properties[‘serialnumber’] = “serial number goes here…”; return $item_properties; }
I found the filter “hubwoo_line_item_properties” inside the Plugin code. Just wanted to check if my code makes sense?
Question is also, where i could create the custom field on Hubspot side. Since there is no line item object, should i go for the product object? That way all product would have a “serialnumber” field, which will then be populated when a deal with that line item gets created…
Regards,
Robin
- The topic ‘Custom Field sync Line Item’ is closed to new replies.