Last active
May 14, 2020 08:10
-
-
Save hedqvist/7317804c626a05075dcfe9ff4cc31ad7 to your computer and use it in GitHub Desktop.
Unifaun - Declaration value from product
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 Line Value | |
| * @author Redlight Media AB / Christopher Hedqvist | |
| * @compatible WooCommerce 3.9.0 | |
| */ | |
| function redlight_unifaun_customs_line_value( $line, $shipment, $order, $product, $item ) { | |
| $line['value'] = $product->get_price(); | |
| return $line; | |
| } | |
| add_filter('ac_wc_unifaun_shipment_customs_declaration_line', 'redlight_unifaun_customs_line_value', 10, 5 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment