Created
March 11, 2022 11:16
-
-
Save hedqvist/1d91ed1bb98b560e44440be6e3effdc1 to your computer and use it in GitHub Desktop.
nShift Unifaun - returnPart
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 returnpart in Unifaun | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 6.2.0 | |
*/ | |
function redlight_unifaun_bring_return_part( $shipment, $order ) { | |
if( 'PNL342' === $shipment['service']['id'] ){ | |
$shipment['returnPart']['quickId'] = 'RETURNPART1'; | |
} | |
return $shipment; | |
} | |
add_filter('ac_wc_unifaun_shipment_data', 'redlight_unifaun_bring_return_part', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment