Created
November 28, 2017 10:52
-
-
Save ahmedeshaan/f1912fde005ed71d295c92dbee43a535 to your computer and use it in GitHub Desktop.
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
add_action( 'woocommerce_add_order_item_meta', 'flatsome_add_sku_order_details', 10, 3 ); | |
function flatsome_add_sku_order_details( $item_id, $values, $cart_item_key ) { | |
$item_sku = get_post_meta( $values[ 'product_id' ], '_sku', true ); | |
wc_add_order_item_meta( $item_id, 'sku', $item_sku , false ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment