Skip to content

Instantly share code, notes, and snippets.

@bekarice
Last active May 13, 2019 17:01
Show Gist options
  • Save bekarice/5b335a8c19a1f473998c to your computer and use it in GitHub Desktop.
Save bekarice/5b335a8c19a1f473998c 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
}
@amjad
Copy link

amjad commented May 13, 2019

Does this replace the new “text” status with the old status icons?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment