Created
September 2, 2015 20:38
-
-
Save wisecrab/92507fdbecac8ce3410f 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
<?php | |
/*********************************************************************************** | |
These are examples and references for the WooCommerce Order Item meta data hooks | |
that is displayed in the admin side of WordPress when viewing a customer's order. | |
***********************************************************************************/ | |
//Do Something before the order item's meta data | |
do_action( 'woocommerce_before_order_itemmeta', $item_id, $item, $_product ); | |
//Do Something after the order item's meta data | |
do_action( 'woocommerce_after_order_itemmeta', $item_id, $item, $_product ); | |
//Display a message above the item meta data | |
function display_message_above() { | |
echo '<p>Here is my content above the item meta data!</p>'; | |
} | |
add_filter( 'woocommerce_hidden_order_itemmeta', 'display_message_above' ); | |
//Display a message below the item meta data | |
function display_message_below() { | |
echo '<p>Here is my content below the item meta data!</p>'; | |
} | |
add_filter( 'woocommerce_hidden_order_itemmeta', 'display_message_below' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment