• Resolved Bastian Fie?inger

    (@bastianfiessinger)


    If I use the render_block filter to manipulate the gutenberg block output and just write a single line before returning the block’s content my confirmation email will be empty.
    It has its defined recipient, From and To Parameters, but the content is completely empty.

    Even if I use something like:

      if ( has_shortcode( $block_content, 'advanced_form' ) ) {
        return $block_content;
      }

    if I just write return $block_content; without any previous line it’s working…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author fabianlindfors

    (@fabianlindfors)

    That’s weird!

    I don’t have to much experience using Gutenberg in combination with Advanced Forms. Do you have a site I could access to look closer into this?

    Thread Starter Bastian Fie?inger

    (@bastianfiessinger)

    Of course. I can give you a view to the page in Dev. Do you have an email where I can address you? I don’t want to make the link public.

    Thanks in advance.

    Thread Starter Bastian Fie?inger

    (@bastianfiessinger)

    For anyone facing the same issue:

    function THEME_render_block_AF_SendEmailContent( $content, $email, $form, $fields ) {
    
    	if ( $content == '' )
    		$content = $email['content'];
    	else
    		$content = $content;
    	
      return $content;
    }
    add_filter( 'af/form/email/content', 'THEME_render_block_AF_SendEmailContent', 10, 4 );

    the content variable will somehow be empty when the shortcode content has been manipulated through render_block but $email['content'] does still store the values.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘render_block filter makes email empty’ is closed to new replies.