Last active
May 13, 2019 17:01
-
-
Save bekarice/5b335a8c19a1f473998c to your computer and use it in GitHub Desktop.
Add WooCommerce custom order status icon
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
/** | |
* 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
Does this replace the new “text” status with the old status icons?