Created
August 13, 2020 10:00
-
-
Save hedqvist/52aa30f09ad7a9fd86d4d2ac84569d6a to your computer and use it in GitHub Desktop.
DB Schenker - Ombud Retur
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
<? | |
/** | |
* @snippet WooCommerce - Adds ADDON to Shipment | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 3.9.0 | |
*/ | |
function redlight_unifaun_bhp_return( $shipment, $order ) { | |
// Only Schenker Ombud | |
if( 'BHP' === $shipment['service']['id'] ){ | |
$shipment['service']['addons'][] = array( | |
'id' => 'RETPP', | |
'misc' => 'STORE' | |
); | |
} | |
return $shipment; | |
} | |
add_filter('ac_wc_unifaun_shipment_data', 'redlight_unifaun_bhp_return', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment