Just an update on this for anyone wanting a solution to this as well. I have found a workaround that is working now.
My case was a little different as I have a booking system on the site, and don’t want to sync all products with Vend, so I needed a way to only map the products that I wanted. It is a bit more manual than connecting with a plugin or using Vend’s connection directly, but it works for what I need.
Firstly I created a Vend ID for the product. I manually copy and paste that from Vend (You could do something else to get this automatically but I didn’t).
/* -------- MAP ADDON TO ATTRIBUTE FOR VEND */
// Hook to add custom field in WooCommerce product general settings
function add_vend_id_custom_field() {
echo '<div class="options_group">';
woocommerce_wp_text_input(
array(
'id' => 'vend_id',
'label' => __('Vend ID', 'woocommerce'),
'placeholder' => __('Enter Vend ID here', 'woocommerce'),
'desc_tip' => true,
'description' => __('Enter the Vend ID for this product. This will be visible only in the admin product page.', 'woocommerce'),
)
);
echo '</div>';
}
add_action('woocommerce_product_options_general_product_data', 'add_vend_id_custom_field');
// Save the custom field value
function save_vend_id_custom_field($product_id) {
$vend_id = isset($_POST['vend_id']) ? sanitize_text_field($_POST['vend_id']) : '';
update_post_meta($product_id, 'vend_id', $vend_id);
}
add_action('woocommerce_process_product_meta', 'save_vend_id_custom_field');
// Save vend_id as order item meta
function add_custom_hidden_order_item_meta_data( $item, $cart_item_key, $values, $order ) {
$product = $values['data'];
$vend_id = get_post_meta($product->get_id(), 'vend_id', true );
if( $vend_id ) {
$item->update_meta_data( '_vend_id', $vend_id );
}
}
add_action('woocommerce_checkout_create_order_line_item', 'add_custom_hidden_order_item_meta_data', 20, 4 );
// Display vend_id in admin order item meta
function filter_wc_order_item_display_meta_key( $display_key, $meta, $item ) {
if( $meta->key === '_vend_id' && is_admin() ) {
$display_key = __("Vend ID", "woocommerce" );
}
return $display_key;
}
add_filter('woocommerce_order_item_display_meta_key', 'filter_wc_order_item_display_meta_key', 20, 3 );
Then I created a Vend Customer ID in wordpress:
// Add custom field to user profile
function add_vendwoo_customer_id_field($user) {
?>
<h3><?php _e('VEND Customer ID', 'woocommerce'); ?></h3>
<table class="form-table">
<tr>
<th><label for="vendwoo_customer_id"><?php _e('VEND Customer ID', 'woocommerce'); ?></label></th>
<td>
<input type="text" name="vendwoo_customer_id" id="vendwoo_customer_id" value="<?php echo esc_attr(get_user_meta($user->ID, 'vendwoo_customer_id', true)); ?>" class="regular-text" /><br />
<span class="description"><?php _e('Enter the VEND Customer ID.', 'woocommerce'); ?></span>
</td>
</tr>
</table>
<?php
}
add_action('show_user_profile', 'add_vendwoo_customer_id_field');
add_action('edit_user_profile', 'add_vendwoo_customer_id_field');
// Save custom field to user meta
function save_vendwoo_customer_id_field($user_id) {
if (current_user_can('edit_user', $user_id)) {
update_user_meta($user_id, 'vendwoo_customer_id', sanitize_text_field($_POST['vendwoo_customer_id']));
}
}
add_action('personal_options_update', 'save_vendwoo_customer_id_field');
add_action('edit_user_profile_update', 'save_vendwoo_customer_id_field');
// Add vendwoo_customer_id as order meta
function add_order_meta_vendwoo_customer_id($order_id) {
$order = wc_get_order($order_id);
$user_id = $order->get_user_id();
$vendwoo_customer_id = get_user_meta($user_id, 'vendwoo_customer_id', true);
$order->update_meta_data('vendwoo_customer_id', $vendwoo_customer_id); // Update the order meta with vendwoo_customer_id
$order->save(); // Save the order
}
add_action('woocommerce_checkout_update_order_meta', 'add_order_meta_vendwoo_customer_id');
This allows me to link the woocommerce user with the Vend user via Make.
My Make flow looks like this now:
- Watch orders
- Iterator and Aggregator to get OrderID array
- I force Wordpress users to login to purchase so I create a customer in Vend using the woocommerce user details. I first set a variable of the Wordpress user vendwoo_customer_id.
If it is empty, create a new customer in Vend. Set a variable called customer_id, and then update the wordpress user with that variable. Now if the same user purchases again it won’t recreate them in Vend as the vendwoo_customer_id will be populated.
-
I get those two customer variables on the other line so that I can call them in the create sale at the end.
-
I set the vend product id variable that I have manually entered into woocommerce. This then means I don’t have to match via sku as I wanted originally. (More manual, but it works)
-
Create a sale by making sure I have the correct customer id:

and then by getting the product id from the variable I created earlier:
Hope it helps any newbie like me trying to map data between the two.