German Market: How can I only show the imprint in the footer of the mail?

Currently I’m looking for a way to modify the code of the Plugin WooCommerce-German-Market.

The goal is to change the email footer so only imprint is shown (not the full terms etc.)

My first hint was to modify a code for removing special tags. But it’s not working.

My custom function.php

function showOnlyImprint(){
          
        $imprint_page_id = get_option( WGM_Helper::get_wgm_option( 'impressum' ) );
        $imprint_page = get_post( $imprint_page_id );
        
        WGM_Email::the_mail_footer_section(
                __( 'Legal Information', 'woocommerce-german-market' ),
                 $imprint_page->post_content
            );
      
}                                                      

add_filter('get_email_de_footer','showOnlyImprint');

But I’m pretty sure that get_email_de_footer is wrong.

In the file WooCommerce-German-Market.php I read the line:

add_action( 'woocommerce_email_footer',                                 array( 'WGM_Email', 'disable_footer_text_for_admin_emails' ) );

But I’m confused, what is the array doing? I cannot find WGM_Email? Is it a file?

Updated: WGM_Email is a prefix for the WGM_Email.php. Good to know. But still it’s not working

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Okay after digging around and trying to understand the syntax of wordpress’s API, I found the solution:

add_filter('wgm_email_display_terms', false);
add_filter('wgm_email_display_cancellation_policy', false);
add_filter('wgm_email_display_gerneral_customer_information_headline', false);
add_filter('wgm_email_display_delivery', false);
add_filter('wgm_email_display_payment_methods', false);

I hope this helps you!


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x