Last active
June 23, 2017 11:58
-
-
Save xlplugins/9c879e221ac14f67e84364efa78fb6c0 to your computer and use it in GitHub Desktop.
Show Inventory Bar on WooCommerce Product Grid
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
/** | |
* Customize and show inventory bar on grid | |
*/ | |
add_filter("wcct_add_bar_to_grid", "custom_wcct_add_bar_to_grid"); | |
function custom_wcct_add_bar_to_grid($config) | |
{ | |
$config = array( | |
'skin' => 'stripe_animate', | |
'edge' => 'smooth', | |
'orientation' => 'rtl', | |
'height' => '12', | |
'bg_color' => '#dddddd', | |
'active_color' => '#ee303c', | |
'display' => "Hurry up! Just <span>{{remaining_units}}</span> items left in stock\n{{counter_bar}}", | |
'border_width' => '1', | |
'border_color' => '#444444', | |
'border_style' => 'none', | |
); | |
return $config; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment