Skip to content

Instantly share code, notes, and snippets.

@jacobdubail
Last active October 12, 2020 21:14
Show Gist options
  • Save jacobdubail/03bc49cd0d322758fa4e1f5f264467fc to your computer and use it in GitHub Desktop.
Save jacobdubail/03bc49cd0d322758fa4e1f5f264467fc to your computer and use it in GitHub Desktop.
output order receipt link on WooCommerce admin order screen
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