• Resolved judiweingarden

    (@judiweingarden)


    can someone please help this total novice? I need to remove the sku’s from my packing slips – can you tell me where to add the line of code?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hello @judiweingarden,

    Try using this code snippet:

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles', 10, 2 );
    function wpo_wcpdf_custom_styles ( $document_type, $document ) {	
      if ($document_type == 'packing-slip'){
        ?>
        .product .meta .sku {
          display: none;
        }	
        <?php
      }
    }

    You can place this code snippet in the functions.php of your child theme. If you haven’t worked with code snippets or functions.php before please read this: How to use filters

    Let me know if it works!

    Thread Starter judiweingarden

    (@judiweingarden)

    it worked!!! thank you so much!

    Thread Starter judiweingarden

    (@judiweingarden)

    except…. it also removed the sku’s from the invoices – do you know if there’s a way to remove them ONLY from the packing slips?

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hello @judiweingarden,

    In the code I have specified that it’s explicitly applied only to packing slips. Please check if you copied the whole code, not just a part of it.

    Are you adding the code to your site using Code Snippets, the functions.php file of your child theme, or in some other way?

    Thread Starter judiweingarden

    (@judiweingarden)

    Hi again,
    I went back to an older invoice and it DOES appear to be working correctly.
    THANK YOU again so much!!!
    Judi

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘remove sku’ is closed to new replies.