Created
August 24, 2020 08:41
-
-
Save hedqvist/9c17eade9b0b118c8a1114a468bd8f62 to your computer and use it in GitHub Desktop.
Unifaun - SecurityDeclaration
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 -Unifaun - Set Customs Security printset | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 3.9.0 | |
*/ | |
function redlight_unifaun_customs_security( $customsDeclaration, $shipment, $order_id) { | |
//$order = new WC_Order($order_id); | |
if( 'BREKI' === $shipment['service']['id'] ){ | |
$customsDeclaration['printSet'] = ['SECURITY']; | |
} | |
return $customsDeclaration; | |
} | |
add_filter('ac_wc_unifaun_shipment_customs_declaration', 'redlight_unifaun_customs_security', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment