Looks like I found the solution for you. Please use following code snippet
add_filter( 'awl_labels_hooks', 'my_awl_labels_hooks' );
function my_awl_labels_hooks( $hooks ) {
$hooks['before_title']['single']['elementor/widget/render_content'] = array( 'priority' => 10, 'type' => 'filter', 'callback' => 'awl_elementor_render_content_single_title', 'args' => 2 );
return $hooks;
}
function awl_elementor_render_content_single_title( $widget_content, $block ) {
if ( is_singular( 'product' ) && $block->get_name() === 'woocommerce-product-title' ) {
$widget_content = AWL_Label_Display::instance()->show_label( 'before_title' ) . $widget_content;
}
if ( is_singular( 'product' ) && $block->get_name() === 'woocommerce-product-images' ) {
$widget_content = AWL_Label_Display::instance()->show_label( 'on_image' ) . $widget_content;
}
return $widget_content;
}
You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.
Regards