1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Third-party compatibility
  5. Send add-on field data to ShipStation
  1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Send add-on field data to ShipStation

Send add-on field data to ShipStation

You can export add-on field data from orders to ShipStation using a snippet. ShipStation only allow two fields to be sent – custom field 2 and custom field 3.

You’ll need to use the following snippet, updating the return values for each filter with the name of the data you want to send. The name can be formed by adding an underscore before the field label name -so if your field label is ‘Upload’, the name will be ‘_Upload’.

<?php
/*
* Send add-on field data to ShipStation
* @link https://woocommerce.com/document/shipstation-for-woocommerce/
*/
// This is for custom field 3
function prefix_shipstation_custom_field_2() {
return '_meta_key_2'; // Replace this with the key of your custom field
}
add_filter( 'woocommerce_shipstation_export_custom_field_2', 'prefix_shipstation_custom_field_2' );
// This is for custom field 3
function prefix_shipstation_custom_field_3() {
return '_meta_key_3'; // Replace this with the key of your custom field
}
add_filter( 'woocommerce_shipstation_export_custom_field_3', 'prefix_shipstation_custom_field_3' );

Here’s how to add a snippet.

Was this article helpful?

Related Articles