• Is there a way to remove the user subscribe status in woocommerce order e-mail (after customer addresses?) The section’s title is “Additional information”

    Thanks

Viewing 1 replies (of 1 total)
  • KJ

    (@kjvextras)

    Hi there! Thanks for reaching out. Lets try this;

    To remove the “user subscribe status” from the WooCommerce order email, specifically the “Additional information” section, you can achieve this by modifying the email template or using a filter in your theme’s functions.php file.

    Typically, you would look for the specific hook that outputs the subscription status in that email template and either remove it or hide it conditionally based on your requirements.

    Here’s a basic outline of how to remove sections from WooCommerce emails:

    1. Locate the email template: You may need to override the default WooCommerce email template in your theme. Copy the template from woocommerce/templates/emails/ into your theme directory under yourtheme/woocommerce/emails/.
    2. Edit the template: Open the relevant email template (e.g., customer-completed-order.php or any other applicable one) and look for the section that contains the subscription status.
    3. Remove or comment out that section. It may look like a simple line of code, for example:
       echo $order->get_meta('mailchimp_woocommerce_is_subscribed');
    1. Alternatively, use a filter in functions.php to remove the entry from the email output without modifying the template directly. Here’s an example:
       add_filter('woocommerce_email_order_meta', 'remove_mailchimp_subscription_status', 10, 3);
       function remove_mailchimp_subscription_status($order_meta, $sent_to_admin, $order) {
           unset($order_meta['mailchimp_woocommerce_is_subscribed']);
           return $order_meta;
       }
    1. Test the change: Send a test email to ensure that the subscription status no longer appears.

    This approach lets you control the visibility of the subscription status in your WooCommerce email notifications

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.