Delete Produkt SKU

WCMp Catalog Enquiry

Delete Produkt SKU Open

Viewing 3 reply threads
  • Author
    Posts
    • #100846
      Patrick Karl
      Participant

      Hello, is it possible to delte the Product SKU?
      I’ve seen that they give a solution with changing the PHP, but I’m not a developer and don’t know how to proceed.

    • #100881
      sumit singh
      Moderator

      Hi, Yes you can delete sku by using following code snippet :

      if(get_post_meta('put product id', '_sku', true)) {
          delete_post_meta('put product id', '_sku');
      }
      Copy
    • #100962
      Patrick Karl
      Participant

      Unfortunately the snippet has no effect. The test mail still contains the section Product SKU:.

    • #100966
      sumit singh
      Moderator

      Hi, The above snippet will delete the sku of the product, you just need to replace ‘put product id’ with your product id. Assumining the product id is 22 then the snippet will look like :

      if(get_post_meta(22, '_sku', true)) {
          delete_post_meta(22, '_sku');
      }
      Copy

      So the code snippet is absolutely fine but the way you impletment it at your may be cause of your issue.

      Thankyou.

Viewing 3 reply threads

Please LOGIN to reply to this topic

COVID-19 Outbreak: WCMp team is supporting business affected by coronavirus

Read the Message Buy at Slashed Price