Created
May 31, 2018 07:46
-
-
Save kartikparmar/7db4c50f5204181a276b5cc4fd380fe2 to your computer and use it in GitHub Desktop.
Show product's extra information inline on Order Received page and Email Notification
This file contains 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 | |
function woocommerce_order_item_get_formatted_meta_data_callback( $formatted_meta ){ | |
foreach ( $formatted_meta as $key => $value ) { | |
$formatted_meta[$key]->display_value = wp_strip_all_tags( $value->display_value ); | |
} | |
return $formatted_meta; | |
} | |
add_filter( "woocommerce_order_item_get_formatted_meta_data", "woocommerce_order_item_get_formatted_meta_data_callback", 10, 1 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment