Using Shipstation Order Information Fields
-
I am trying to add product options for WooCommerce to be sent to Shipstation. I am able to accomplish this when editing class-wc-shipstation-api-export.php by inserting the following code just after line 273 – just before the first instance of $items_xml->appendChild( $item_xml ); .
$sashPreview = $item['vpc-custom-data']['preview_saved']; //Get the flag sides for dual-country sash $sashSideOne = $item['vpc-cart-data']['Why']; if ( !empty( $sashPreview ) ) { if ( !empty( $sashSideOne ) ) { $options_xml = $xml->createElement( 'Options' ); $option_xml = $xml->createElement( 'Option' ); $this->xml_append( $option_xml, 'Name', 'Why' ); $this->xml_append( $option_xml, 'Value', wp_strip_all_tags( $sashSideOne) ); $options_xml->appendChild( $option_xml ); $item_xml->appendChild( $options_xml ); } }
However, the problem is that when the plugin is updated, it overwrites my code. Is there another way to do this – maybe a hook, other than the custom field. The custom field hook does not work because this isn’t a custom field. It’s being mapped to the Product Options in ShipStation. The plugin already maps some product options, but in this case, it doesn’t because of it being a third-party plugin that creates these options in WooCommerce.
The page I need help with: [log in to see the link]
- The topic ‘Using Shipstation Order Information Fields’ is closed to new replies.