thewhitestrabbit on "[Plugin: WooCommerce Germanized] Shortcodes in Bestätigungsmail"

ساخت وبلاگ

Hello,

I've the same problem with my theme enfold from kriesi, I'm using the ALB (advanced layout builder) which make usage of short codes for my pages "Widerrufsrecht" (revocation), "AGB" (terms of service) and "Datenschutz" (data safety).
They get attached to customer mails and also here the shortcodes are displayed instead of the content.

So here is the germanized email template code for woocommerce-germanized/templates/emails/email-footer-attachment.php

<?php
/** * Email Footer Page Attachment * * @author Vendidero * @version 1.0.0 */
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
global $post;
$post = $post_attach;
setup_postdata( $post );
$content = ( get_post_meta( $post->ID, '_legal_text', true ) ? htmlspecialchars_decode( get_post_meta( $post->ID, '_legal_text', true ) ) : $post->post_content );
$print_title = true;
if ( substr( trim( $content ), 0, 2 ) == '<h' ) $print_title = false;
?>
<div class="wc-gzd-email-attach-post smaller" id="wc-gzd-email-attach-post-<?php the_id();?>"> <?php if ( $print_title ) : ?> <h4 class="wc-gzd-mail-main-title"><?php the_title();?></h4> <?php endif; ?> <div class="wc-gzd-email-attached-content"> <?php if ( ! get_post_meta( $post->ID, '_legal_text', true ) ) : ?> <?php the_content();?> <?php else : ?> <?php echo apply_filters( 'the_content', htmlspecialchars_decode( get_post_meta( $post->ID, '_legal_text', true ) ) ) ?> <?php endif; ?> </div>
</div>
<?php wp_reset_postdata(); ?>

So in line 34 in my case I should change
<?php the_content();?>
to
<?php echo $post->post_content();?>

Is this right?
And can you pls also tell the exact path to where the modified file must go starting at /myChildThemeFolder/...?

Thanks a lot
Tom

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 242 تاريخ : جمعه 8 مرداد 1395 ساعت: 5:45