Created
July 27, 2020 09:12
-
-
Save hedqvist/aa06b59f683281bcefc9b781020e4653 to your computer and use it in GitHub Desktop.
Fortnox - South Korea Temp Fix
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 -Fortnox - Solve South Korea until Fortnox fixes backend | |
| * @author Redlight Media AB / Christopher Hedqvist | |
| * @compatible WooCommerce 4.1.0 | |
| */ | |
| function redlight_fortnox_south_korea( $orderData, $order_id) { | |
| //$order = new WC_Order($order_id); | |
| if( $orderData['Order']['Country'] == 'South Korea' ){ | |
| $orderData['Order']['Country'] = 'Korea, Republic of'; | |
| } | |
| if( $orderData['Order']['DeliveryCountry'] == 'South Korea' ){ | |
| $orderData['Order']['DeliveryCountry'] = 'Korea, Republic of'; | |
| } | |
| return $orderData; | |
| } | |
| add_filter('obj_fortnox_order_data', 'redlight_fortnox_south_korea', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment