Created
December 2, 2019 16:59
-
-
Save hedqvist/52d373445093422a3625fad8e730343d to your computer and use it in GitHub Desktop.
Fortnox - Set Customer type (GUEST)
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 - (GUEST USERS) Set customer Type to Private | |
| * @author Redlight Media AB / Christopher Hedqvist | |
| * @compatible WooCommerce 3.4.2 | |
| */ | |
| function redlight_fortnox_guest_customer_type( $customer, $order_id ) { | |
| $customer['Customer']['Type'] = 'PRIVATE'; | |
| return $customer; | |
| } | |
| add_filter( 'obj_fortnox_guest_customer_data', 'redlight_fortnox_guest_customer_type', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment