Created
June 23, 2022 09:28
-
-
Save hedqvist/ede1f393596c58f931d3267b6beb27a6 to your computer and use it in GitHub Desktop.
Fortnox - Itemname Override
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 - Use item name from WooCommerce | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 6.0.0 | |
*/ | |
function redlight_fortnox_order_item_name( $orderItem, $item, $product_id, $order ) { | |
$orderItem['Description'] = $item->get_name(); | |
return $orderItem; | |
} | |
add_filter('obj_fortnox_order_item_row_data', 'redlight_fortnox_order_item_name', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment