Skip to content
Discussion options

You must be logged in to vote

You can use the WooCommerce actions for this by closing/opening divs with priority order:

/**
* Hook: woocommerce_after_shop_loop_item.
*
* @hooked woocommerce_template_loop_product_link_close - 5
* @hooked woocommerce_template_loop_add_to_cart - 10
*/
do_action('woocommerce_after_shop_loop_item');

This wraps the button into a card-footer:

// Close card-body before add to cart and open new card-footer
add_action(
  'woocommerce_after_shop_loop_item',
  function () {
    echo '</div><div class="card-footer">';
  },
  9 // before add to cart (10)
);

Fine-tune this with a …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@goclimbing
Comment options

Answer selected by crftwrk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants