Custom WooCommerce Badge

Add custom fields using ACF, display in template, position with CSS.

add_action( 'woocommerce_before_shop_loop_item_title', 'kpry_custom_woo_product_badge' );
function kpry_custom_woo_product_badge() {
   global $product;

   $badge_1_enable = get_field( 'badge_1_enable' );

   if( $badge_1_enable ) {

      $badge_1_text    = get_field( 'badge_1_text' );
      $badge_1_colour  = get_field( 'badge_1_colour' );

      echo '<span class="bm_custom_woo_badge_1" style="background: ' . $badge_1_colour . ';">' . $badge_1_text . '</span>';
   }
}
.bm_custom_woo_badge_1 {
	padding: 8px;
	text-align: center;
	color: white;
	font-weight: bold;
	position: absolute;
	top: 37.5px;
	right: 0px;
	font-size: 12px;
	text-transform: uppercase;
}