Hi there,
I hope you’re well. To change the Select an option label in the select add-ons, you will need to add the following PHP code in the functions.php of your current theme:
if ( ! function_exists( 'yith_wapo_custom_select_option_label' ) ) {
function yith_wapo_custom_select_option_label( $label ) {
return 'Your custom label';
}
add_filter( 'yith_wapo_select_option_label', 'yith_wapo_custom_select_option_label', 10, 1 );
}
We’ll remain at your disposal.
Hi,
thx for the fix…but I don´t understand why I need a fix in the functions.php? The term “select option” is getting translated by the language file + general settings of your plugin!?
And the fix does not fix the error message “Please, select an option”….after not selecting the option and add to cart (it´s mandatory).
REgards
Hi,
I´m still waiting for the fix of error message.
Regards
Hi there,
In that case, you could try the following PHP code instead, which will let you modify the messages of when the add-ons settings are validated in the product page:
if ( ! function_exists( 'yith_wapo_custom_change_error_messages' ) ) {
add_filter( 'yith_wapo_frontend_localize_args', 'yith_wapo_custom_change_error_messages', 10, 1 );
function yith_wapo_custom_change_error_messages( $args ) {
if ( isset( $args['i18n']['selectAnOption'] ) ) {
$args['i18n']['selectAnOption'] = 'Please, select an option';
}
if ( isset( $args['messages']['checkMinMaxErrorMessage'] ) ) {
$args['messages']['checkMinMaxErrorMessage'] = 'Please, select an option';
}
return $args;
}
}
Let us know if this helped you.
Hi,
there´s another translation problem within the plugin.
Regarding “Total Price Box”: Show product price and total options” is NOT getting translated by language files or backend settings. Means:
Product Price: xy
Total options: xy
Order Total: xy
No translation possible!?
Best Regards
René