i have the following bug:when buying a product that is managed by sumosubscriptions in my woocommerce store, and when email is assigned to a user, but user is not logged in, where is error-message Für diese E-Mail-Adresse existiert bereits ein Account. Bitte logge dich ein -> but without link.
I tried adding this to functions.php:
add_filter( 'woocommerce_checkout_posted_data', 'ftm_filter_checkout_posted_data', 10, 1 );
function ftm_filter_checkout_posted_data( $data ) {
$email = $data['billing_email'];
if ( email_exists( $email ) ) $data['createaccount'] = 0;
return $data;
}
but deactivating the error wouldnt work.
then i tried adding a link with that filter:
function filter_woocommerce_checkout_must_be_logged_in_message( $message ) {
$message = 'You must be logged in to checkout. <a href="#" id="login-register">login / Register</a>';
return $message;
}
add_filter( 'woocommerce_checkout_must_be_logged_in_message', 'filter_woocommerce_checkout_must_be_logged_in_message', 10, 1 );
Then i tried changing the file /templates/checkout/form-checkout.php in my child theme and added
echo esc_html( apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) ) ) . ' <a href="#" id="login-register">login / Register</a>';
no change whatsoever again.
In the code of the plugin sumosubscriptions, i didnt find any template changes of woocommerce_checkout_must_be_logged_in_message. in woocommerce-germanized pro, i found it in includes/checkout/ in step-address file. but i guess its not advised to add a file from includes folder in child-theme to change it.
at the moment, i have changed behaviour with js. has anyone an idea how to change it directly from template?
thanks in advance