Last active
October 12, 2020 21:14
-
-
Save jacobdubail/03bc49cd0d322758fa4e1f5f264467fc to your computer and use it in GitHub Desktop.
output order receipt link on WooCommerce admin order screen
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
add_action( 'woocommerce_admin_order_data_after_billing_address', function ($order) { | |
if ( current_user_can('manage_options') ) { | |
echo '<p><strong>'. __("Order Key", "woocommerce").':</strong> <input type="text" readonly value="/checkout/order-received/' . $order->id . '/?key=' . $order->get_order_key() . '" /></p>'; | |
} | |
}, 10, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment