Last active
June 23, 2017 12:03
-
-
Save xlplugins/737adfbfba028f603abdef74cf228078 to your computer and use it in GitHub Desktop.
Show Campaign Timer 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 countdown timer on grid | |
*/ | |
add_filter("wcct_add_timer_to_grid", "custom_wcct_add_timer_to_grid"); | |
function custom_wcct_add_timer_to_grid($config) { | |
$config = array( | |
'skin' => 'round_fill', // you can use following values (default | square_ghost | square_fill | round_ghost | round_fill | highlight_1) | |
'bg_color' => '#666667', | |
'label_color' => '#ffffff', | |
'timer_font' => '15', | |
'label_font' => '12', | |
'display' => "{{countdown_timer}}", | |
'label_days' => 'days', | |
'label_hrs' => 'hrs', | |
'label_mins' => 'mins', | |
'label_secs' => 'secs', | |
'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