I @isaaccolavecchio,
You can customize your subject email with yith_wcwl_email_share_subject filter. Just add the following code to your customization plugin:
if ( class_exists( 'YITH_WCWL' ) ) {
if(! function_exists('yith_wcml_set_email_share_subject')) {
function yith_wcml_set_email_share_subject( $subject ) {
$subject = 'I wanted you to see this site';
return $subject;
}
}
add_filter( 'yith_wcwl_email_share_subject', 'yith_wcml_set_email_share_subject' );
}
Try it and let me know.
Have a nice day,
Yithemes.
-
This reply was modified 6 years, 2 months ago by YITHEMES.
Hi,
I have added this function – it works fine but still replaces spaces with the character “+”
Can you advice?
Hi @geraldmorales,
Wishlist creates an URL encoded to can be compatible with most mail clients. Somes needs the “+” character and not works correctly with spaces. Anyway, you can remove this process. You only need to go to:
yith-woocommerce-wishlist/templates/share.php:44 file
<a class="email" href="mailto:?subject=<?php echo urlencode( apply_filters( 'yith_wcwl_email_share_subject', $share_link_title ) )?>&body=<?php echo apply_filters( 'yith_wcwl_email_share_body', urlencode( $share_link_url ) ) ?>&title=<?php echo $share_link_title ?>" title="<?php _e( 'Email', 'yith-woocommerce-wishlist' ) ?>">
And remove the url encode method from subject, like this:
<a class="email" href="mailto:?subject=<?php echo apply_filters( 'yith_wcwl_email_share_subject', $share_link_title ) ?>&body=<?php echo apply_filters( 'yith_wcwl_email_share_body', urlencode( $share_link_url ) ) ?>&title=<?php echo $share_link_title ?>" title="<?php _e( 'Email', 'yith-woocommerce-wishlist' ) ?>">
Whit this you can generate a mailto URL without “+” character on subject. But be careful, this could not works for some mail clients.
Works perfectly – thank you for your fast and effective support.
Hello there,
I’m glad to hear it’s working. I would like to invite you to leave a review about this plugin. You can leave a review by clicking on the following link
Thanks in advance.
Have a good day,
YIThemes.