Created
August 13, 2019 07:58
-
-
Save hedqvist/630fb885c4ab93de6e997cbf37f36ffb to your computer and use it in GitHub Desktop.
Unifaun - senderReference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @snippet WooCommerce - Sets custom reference in Unifaun | |
| * @author Redlight Media AB / Christopher Hedqvist | |
| * @compatible WooCommerce 3.7.0 | |
| */ | |
| function redlight_unifaun_reference( $shipment, $order ) { | |
| $shipment['senderReference'] = 'TOP-' . $order->get_order_number(); | |
| return $shipment; | |
| } | |
| add_filter('ac_wc_unifaun_shipment_data', 'redlight_unifaun_reference', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment