• Resolved ebud

    (@ebud)


    I am trying to use your custom template shortcode to include the list in the email generate by CF7.

    I know in the past I had to use this filter to support external shortcode in CF7, but yours is not rendering.

    function my_special_mail_tag( $output, $name, $html ) {
    	if ( 'ccc_my_favorite_list_custom_template' == $name )
    	$output = do_shortcode( "[$name]" );
    	$output .= 'test'; // confirmed this has fired.
    	return $output;
    	}
    add_filter( 'wpcf7_special_mail_tags', 'my_special_mail_tag', 10, 3 );
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello @ebud ,
    Thank you for your question.

    However, unfortunately, I am not familiar enough with CF7 to know about compatibility and solutions.
    As you may have already read, it has been discussed in other topics.
    I hope this is helpful to you.

      Thanks

    Thread Starter ebud

    (@ebud)

    Thanks for the response.

    I have looked at both of those topics, but I cannot get the shortcode (from Git) to fire in the Contactform 7 email template. The above filter allows for 3rd party shortcode to be run in the email template, but yours ( or the customization ) to is not working here. I think it may be related to getting the list of id’s from localstorag or an order or priority thing.

    Your plugin is a great option and everything works well, except I need the above to work in my project. Basically we just need a list of user favorites in the email message that is sent.

    Thread Starter ebud

    (@ebud)

    I figured out a workaround by using your ccc_my_favorite_list_custom_template( $my_favorite_post_id=false ) function I was able to copy the favorite id’s to session which allows me to access them via PHP inside a custom shortcode wrapper.

    • This reply was modified 2 years, 3 months ago by ebud.
    • This reply was modified 2 years, 3 months ago by ebud.
    • This reply was modified 2 years, 3 months ago by ebud.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Include favorite list in Contact Form 7’ is closed to new replies.