Change position of swatches in the catalog

Swatches in the catalog currently show up after the shop loop item ( woocommerce_after_shop_loop_item ). it's possible to change this to any of the following locations:

  • woocommerce_before_shop_loop_item
  • woocommerce_before_shop_loop_item_title
  • woocommerce_shop_loop_item_title
  • woocommerce_after_shop_loop_item_title
  • woocommerce_after_shop_loop_item

Using the  Code Snippets plugin, add the following code to your website:

function iconic_was_loop_position( $position ) {
	return 'woocommerce_shop_loop_item_title';

add_filter( 'iconic_was_loop_position', 'iconic_was_loop_position', 10, 1 );

You can change return 'woocommerce_shop_loop_item_title'; to your preferred location.