Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
Created June 23, 2020 16:20
Show Gist options
  • Select an option

  • Save farookibrahim/9459d44666d6d8542bf3970938887299 to your computer and use it in GitHub Desktop.

Select an option

Save farookibrahim/9459d44666d6d8542bf3970938887299 to your computer and use it in GitHub Desktop.
Cartzilla - Marketplace shop archive display sale badge
if ( ! function_exists( 'cartzilla_toggle_shop_loop_v2_hooks' ) ) {
function cartzilla_toggle_shop_loop_v2_hooks() {
if ( 'style-v2' === cartzilla_get_shop_page_style() ) {
add_action( 'woocommerce_before_shop_loop_item', 'cartzilla_wc_loop_product_sale_flash', 25 );
}
}
}
add_action( 'woocommerce_before_shop_loop', 'cartzilla_toggle_shop_loop_v2_hooks', 10 );
.product .product-card-alt .badge {
top: 0.75rem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment