Last active
February 19, 2020 13:01
-
-
Save hedqvist/f768c1e8561c0c4dadc77d1cb8ce84ae to your computer and use it in GitHub Desktop.
Fortnox - Dont prefill from customer card
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 plugin by Redlight Media - Set Blank field in order to prevent details from customer card | |
| * @author Redlight Media AB / Christopher Hedqvist | |
| * @compatible WooCommerce 3.9.2 | |
| */ | |
| function redlight_fortnox_prevent_autofill($orderData) { | |
| if(empty($orderData['Order']['Address2'])){ | |
| $orderData['Order']['Address2'] = "API_BLANK"; | |
| } | |
| if(empty($orderData['Order']['DeliveryAddress2'])){ | |
| $orderData['Order']['DeliveryAddress2'] = "API_BLANK"; | |
| } | |
| return $orderData; | |
| } | |
| add_filter('obj_fortnox_order_data', 'redlight_fortnox_prevent_autofill', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment