Last active
August 27, 2020 08:09
-
-
Save hedqvist/0a84205457bdc19b4a925a33ff9f135a to your computer and use it in GitHub Desktop.
Unifaun - Small Labels for PUE
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 size of shippinglabel to 107x72 (thermo-brev3) | |
| * @author Redlight Media AB / Christopher Hedqvist | |
| * @compatible WooCommerce 4.4.0 | |
| */ | |
| function redlight_unifaun_pacsoft_pdf_label( $pdf_config, $order ) { | |
| if( 'Brev i posten' === $order->get_shipping_method() || 'Fri frakt' === $order->get_shipping_method() || 'Free delivery' === $order->get_shipping_method() || 'Postage' === $order->get_shipping_method() ){ | |
| $pdf_config['target1Media'] = 'thermo-brev3'; | |
| } | |
| return $pdf_config; | |
| } | |
| add_filter('ac_wc_unifaun_shipment_pdf_config_data', 'redlight_unifaun_pacsoft_pdf_label', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment