phpwordpresswoocommerceemail-notificationssku

Remove Product SKU from order details in WooCommerce email notifications


I've been trying to remove the product SKU located after the product title in WooCommerce email notifications.

I have tried the following:

function sv_remove_product_page_skus( $enabled ) {
    if ( ! is_admin() && is_product() ) {
        return false;
    }

    return $enabled;
}
add_filter( 'wc_product_sku_enabled', 'sv_remove_product_page_skus' );

But didn't work, the product SKU remains after the product title.


Solution

  • To remove product SKU from email notifications, simply use the following:

    add_filter( 'woocommerce_email_order_items_args', 'customize_email_order_items_args', 20 );
    function customize_email_order_items_args( $items_args ) {
        $items_args['show_sku'] = false;
    
        return $items_args;
    }
    

    Code goes in functions.php file of your child theme (or in a plugin). Tested and works.