November 27, 2018 at 6:52 am
” I am trying to show my own custom element (countdown timer or counter bar) on grid page using this code. But it seems you have modified the native WooCommerce templates. Can you modify below code such that I am able to get my custom element working.
/**
* Call Countdown Timer in product loop below product name using shortcode.
* This inherit product’s timer settings and follow campaign rules.
*/
add_action(‘woocommerce_after_shop_loop_item’, ‘wcct_shop_loop_timer_display’, 5);
if (!function_exists(‘wcct_shop_loop_timer_display’)) {
function wcct_shop_loop_timer_display() {
echo do_shortcode(‘[finale_countdown_timer skip_rules=”no”]’);
}
}
/**
* Call Counter Bar in product loop below product name using shortcode.
* This inherit product’s bar settings and follow campaign rules.
*/
add_action(‘woocommerce_after_shop_loop_item’, ‘wcct_shop_loop_bar_display’, 5);
if (!function_exists(‘wcct_shop_loop_bar_display’)) {
function wcct_shop_loop_bar_display() {
echo do_shortcode(‘[finale_counter_bar skip_rules=”no”]’);
}
}
Thanks for your help.”
PS: I am marking my plugin developer (XLPlugins) in loop so you can joint work it out.