Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Basilakis/b1b2e4d5efdc7211d3e0 to your computer and use it in GitHub Desktop.
Save Basilakis/b1b2e4d5efdc7211d3e0 to your computer and use it in GitHub Desktop.
Add WooCommerce custom order status icon
/**
* Adds icons for any custom order statuses
* Tutorial: http://www.skyverge.com/blog/changing-woocommerce-custom-order-status-icons/
**/
add_action( 'wp_print_scripts', 'skyverge_add_custom_order_status_icon' );
function skyverge_add_custom_order_status_icon() {
if( ! is_admin() ) {
return;
}
?> <style>
/* Add custom status order icons */
.column-order_status mark.awaiting-shipment,
.column-order_status mark.building {
content: url(/wp-content/uploads/2014/10/CustomOrderStatus.png);
}
/* Repeat for each different icon; tie to the correct status */
</style> <?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment