admin管理员组

文章数量:1289530

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 3 years ago.

Improve this question

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

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 3 years ago.

Improve this question

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

Share Improve this question edited Jul 14, 2021 at 16:33 Philipp Mochine asked Jul 14, 2021 at 16:28 Philipp MochinePhilipp Mochine 1015 bronze badges 1
  • If you are interested, I found the basic code here: kriesi.at/support/topic/e-mails-german-market – Philipp Mochine Commented Jul 14, 2021 at 16:32
Add a comment  | 

1 Answer 1

Reset to default 0

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!

本文标签: pluginsGerman Market How can I only show the imprint in the footer of the mail