Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello there.

    You can hide SKU data in single product page by overriding templates/single-product/meta.php file template. Remove this line of codes.

    <?php if ( wc_product_sku_enabled() && ( $product->get_sku() || $product->is_type( 'variable' ) ) ) : ?>
    
    	<span class="sku_wrapper"><?php _e( 'SKU:', 'woocommerce' ); ?> <span class="sku" itemprop="sku"><?php echo ( $sku = $product->get_sku() ) ? $sku : __( 'N/A', 'woocommerce' ); ?></span>.</span>
    
    <?php endif; ?>

    Hide SKU on email template

    Override email order template templates/emails/customer-processing-order.php. Then find this line of code.

    <?php echo $order->email_order_items_table( $order->is_download_permitted(), true, $order->has_status( 'processing' ) ); ?>

    Change the second parameter becomes false. It tells the function to hide SKU. The code will be

    <?php echo $order->email_order_items_table( $order->is_download_permitted(), false, $order->has_status( 'processing' ) ); ?>

    P.S. Here is how to override WC templates properly.

    I hope it helps.

    Thread Starter DTjai

    (@dtjai)

    Hey Kharis,

    Thanks for the answer on my question, the solution did not work however. This The SKU is still displaying after the #SKU

    [img]https://i.imgur.com/iWlonk1.png[/img]

    Any idea why this happens?

    I appreciate the help!

    Regards,

    DTJai

    Thread Starter DTjai

    (@dtjai)

    Hey Kharis,

    Nevermind it worked!
    Thank you very much for helping me out.
    I love it when someone in the community is a good guy like you.

    Thanks,

    DTJai

    Hello there.

    Glad to hear that.

    Happy developing with WooCommerce!

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide SKU on product page and in the copy of the order email?’ is closed to new replies.