Guest User

Untitled

a guest
Aug 25th, 2019
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /**
  4. * @snippet WooCommerce - Sets custom reference in Unifaun
  5. * @author Redlight Media AB / Christopher Hedqvist
  6. * @compatible WooCommerce 3.7.0
  7. */
  8. function redlight_unifaun_reference( $shipment, $order ) {
  9. $shipment['senderReference'] = 'TOP-' . $order->get_order_number();
  10.  
  11. return $shipment;
  12. }
  13. add_filter('ac_wc_unifaun_shipment_data', 'redlight_unifaun_reference', 10, 2 );
RAW Paste Data